Advertisement
Beginner SQL & Database Querying, SQL Aggregations & Grouping

What is HAVING in SQL?

Short answer

Filters grouped results.

Save SQL & Database Querying mock interview
Advertisement
AModel answer
Filters grouped results.
HAVING SUM(sales) > 1000.
Real-world example
Using GROUP BY, an analyst calculated monthly revenue by region in seconds.
Likely follow-ups
  • What are aggregate functions
  • What is GROUP BY
  • What is HAVING
Related topics