Click the Exhibit button and examine the data in the EMPLOYEES table.
Which three subqueries work? (Choose three.)
A.
SELECT *
FROM employees
where salary > (SELECT MIN(salary)
FROM employees
GROUP BY department.id);
B.
SELECT *
FROM employees
WHERE salary = (SELECT AVG(salary)
FROM employees
GROUP BY department_id);
C.
SELECT distinct department_id
FROM employees
Where salary > ANY (SELECT AVG(salary)
FROM employees
GROUP BY department_id);
D.
SELECT department_id
FROM employees
WHERE SALARY > ALL (SELECT AVG(salary)
FROM employees
GROUP BY department_id);
E.
SELECT last_name
FROM employees
Where salary > ANY (SELECT MAX(salary)
FROM employees
GROUP BY department_id);
F.
SELECT department_id
FROM employees
WHERE salary > ALL (SELECT AVG(salary)
FROM employees
GROUP BY AVG(SALARY));
Explanation:
These answers show correct syntax, because they use ANY and ALL keywords for convert multirow output of sub-query to one-row result.