Phase 2 of 8 · 5 lessons

Summarising data: aggregates, GROUP BY and HAVING

Turn many rows into answers — totals, averages, counts per group — and know exactly which rows each number is built from.

Questions like "how many orders per customer?" or "average salary per department?" are the heart of analytics and of SQL interviews. They all use the same three tools: an aggregate function, GROUP BY to make the groups, and HAVING to filter them.

0 of 5 done