SQL - GROUP BY and HAVING
Which of the following is the correct syntax to filter groups with HAVING?
SELECT department, COUNT(*) FROM employees GROUP BY department _______ COUNT(*) > 5;
Which of the following is the correct syntax to filter groups with HAVING?
SELECT department, COUNT(*) FROM employees GROUP BY department _______ COUNT(*) > 5;
GROUP BY, filtering groups requires HAVING, not WHERE.HAVING COUNT(*) > 5 filters groups with more than 5 employees.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions