Aggregate functions and GROUP BY
COUNT, SUM, AVG, MIN, MAX, and how GROUP BY turns rows into summarized buckets - plus why HAVING exists and WHERE can't do its job.
11 min readUpdated 2026-09-04sqlaggregationgroup-byhaving
COUNT, SUM, AVG, MIN, MAX, and how GROUP BY turns rows into summarized buckets - plus why HAVING exists and WHERE can't do its job.