Concept Flow - Window function vs GROUP BY mental model
Start with full table
GROUP BY: collapse rows
Aggregate per group
Result: fewer rows
Use result for analysis
Start with the full table, then choose aggregation. GROUP BY collapses rows into groups and aggregates, returning fewer rows. Window functions keep all rows but add aggregated info per row.
