Prev Question
Next Question

View the Exhibit and examine the structure of the EMPLOYEES table

5a10497e73802 - Which SQL statement would give you the desired result?

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.
SELECT first_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’;

Prev Question
Next Question

Leave a Reply

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