SQL - GROUP BY and HAVING
Choose the correct way to filter grouped results using the HAVING clause:
SELECT city, COUNT(*) FROM customers GROUP BY city _______ COUNT(*) > 10;
Choose the correct way to filter grouped results using the HAVING clause:
SELECT city, COUNT(*) FROM customers GROUP BY city _______ COUNT(*) > 10;
WHERE clause filters rows before grouping, so it cannot filter aggregated groups.HAVING clause filters groups after aggregation, so it is the correct clause to use here.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions