Concept Flow - GROUP BY clause
Start with SELECT query
Identify columns to group by
Scan table rows
Group rows by unique values in GROUP BY columns
Apply aggregate functions (SUM, COUNT, AVG, etc.) per group
Return one result row per group
End
The GROUP BY clause groups rows sharing the same values in specified columns, then aggregates data per group, returning one row per group.