Which SQL statement would give you the desired result?

View the Exhibit and examine the structure of the EMPLOYEES table.

You want to know the FIRST_NAME and SALARY for all employees who have the
same manager as that of the employee with the first name ‘Neena’ and have salary equal
to or greater than that of’Neena’.
Which SQL statement would give you the desired result?

View the Exhibit and examine the structure of the EMPLOYEES table.

You want to know the FIRST_NAME and SALARY for all employees who have the
same manager as that of the employee with the first name ‘Neena’ and have salary equal
to or greater than that of’Neena’.
Which SQL statement would give you the desired result?

A.
SELECTfirst_name, salary FROM employees
WHERE (manager_id, salary) >= ALL (SELECT manager_id, salary FROM employees
WHERE first_name = ‘Neena’ AND first_name <> ‘Neena’;

B.
SELECT first_name, salary FROM employees
WHERE (manager_id, salary) >= (SELECT manager_id, salary
FROM employees
WHERE first_name = ‘Neena’)
AND first_name <> ‘Neena’;

C.
SELECT first_name, salary FROM employees
WHERE (manager_id, salary) >= ANY (SELECT manager_id, salary FROM employees
WHERE first_name = ‘Neena’ AND first_name <> ‘Neena’;

D.
SELECT first_name, salary FROM employees
WHERE (manager_id = (SELECT manager_id
FROM employees
WHERE first_name = ‘Neena’)
AND salary >= (SELECT salary
FROM employees
WHERE first_name = ‘Neena’))
AND first name <> ‘Neena’;



Leave a Reply 0

Your email address will not be published. Required fields are marked *