Blog
Data Engineering FundamentalsCombining tables with JOIN
Facts in one table, context in another — JOIN stitches them together on a shared key. Pandas .merge(), done inside the warehouse.
Filtering groups with HAVING
WHERE filters rows before grouping; HAVING filters groups after aggregation. And why WHERE COUNT(*) >= 5 is invalid — which is exactly why HAVING exists.
One summary per group with GROUP BY
Aggregates collapse a whole table into one number — GROUP BY collapses it into one number per bucket. The per-country, per-day, per-category breakdown behind every dashboard.
Summarizing data with COUNT, SUM, and AVG
How many, how much, on average: the three aggregate functions that turn a million rows into a single dashboard number.
Sorting and taking the top N with ORDER BY and LIMIT
The top-N pattern: sort descending, keep a few rows. Leaderboards, latest records, biggest tables — it all starts here.
Reading data with SELECT and WHERE
The first thing you do with any new table: pick columns, filter rows. SELECT is the column list, WHERE is the row filter — and it maps exactly onto pandas.