Glossary term
What is GROUP BY? Meaning for developers
Collapses rows into groups so aggregate functions can run on each group.
Learn it properly · SQL & PostgreSQLLesson 2: Aggregates, GROUP BY and HAVINGCOUNT, SUM and AVG, GROUP BY rules, HAVING versus WHERE, FILTER, date_trunc reports and the order a SELECT is evaluated.