Direction: Choose the correct option
Q1.
SELECT department, COUNT(*) FROM employees GROUP BY department HAVING COUNT(*) > 5;What does HAVING do?Direction: Choose the correct option
Q2.
SELECT department, AVG(salary) FROM employees GROUP BY department HAVING AVG(salary) > 60000;Which departments are returned?Direction: Choose the correct option
Q3.
SELECT department, SUM(salary) FROM employees GROUP BY department HAVING SUM(salary) > 500000;What condition must departments meet?Direction: Choose the correct option
Q4.
SELECT department, COUNT(*), AVG(salary) FROM employees GROUP BY department HAVING COUNT(*) > 5 AND AVG(salary) > 55000;How many conditions in HAVING?Direction: Choose the correct option
Q5.
What's the difference between WHERE and HAVING?
