LESSON 1.2

Aggregates and GROUP BY

06:00·11,276 learners
Daniel OkaforDaniel Okafor
Next lesson

In this lesson you will

  • Aggregate with count, sum, avg, min, and max
  • Group correctly and know what must be in GROUP BY
  • Filter groups with HAVING, rows with WHERE

Aggregation collapses rows into summaries. WHERE filters before grouping and HAVING after — mixing them up is the classic bug.

What this lesson covers

  • Aggregate with count, sum, avg, min, and max
  • Group correctly and know what must be in GROUP BY
  • Filter groups with HAVING, rows with WHERE

This lesson sits in SQL Essentials, part of PostgreSQL for Developers. It assumes what came before it and leads directly into the next lesson in the module.

UP NEXT

1.3 · CTEs and window functions

07:52

PostgreSQL for Developers

8%

Every lesson, searchable to the second.

© 2026 BIBLION

PRIVACY · TERMS · CONTACT