Explain it in 60 seconds
GROUP BY and HAVING
Backend Engineering · Relational Databases · Beginner
What is the difference between WHERE and HAVING in SQL?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- WHERE filters rows before grouping.
- HAVING filters groups after aggregation.
- HAVING uses aggregate functions.
- WHERE is cheaper when possible.
- Example: customers with >5 orders.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.