DevPath · Learn to code ESPTEN

Databases

📊 Aggregations: GROUP BY and HAVING

Summarize data with aggregate functions (COUNT, SUM, AVG, MIN, MAX), group it with GROUP BY, and filter groups with HAVING.

What you'll learn

Lessons

Aggregate functionsCOUNT, SUM, AVG, MIN, and MAX to summarize many rows into a single value. Grouping with GROUP BYCompute one aggregate per group, not for the whole table. Filtering groups with HAVINGWHERE filters rows; HAVING filters groups by their aggregate.
Practice this module in the app

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →