Concept Flow - How GROUP BY changes query execution
Start with full table data
Scan all rows
Group rows by specified column(s)
Aggregate each group (e.g., COUNT, SUM)
Return one row per group with aggregated values
End
The query first reads all rows, groups them by the chosen column(s), then calculates aggregates for each group, and finally returns one result row per group.