GROUP BY groups rows that share a value, so aggregate functions compute per group. HAVING filters those groups (like WHERE, but for groups/aggregates). Together they're the core of summarizing and analyzing data by category.
GROUP BY — aggregate per group
country, () user_count, (age) avg_age
users
country;
