SQL
Window functions, joins, query plans and modelling patterns that hold up in production.
6 notes · all topicsData engineering
Start here · beginner4
- 1CTEs vs Subqueries vs Temp TablesWhen to use each, what the optimizer does with them, and how to write long transformations that stay readable.2 min
- 2NULL in SQL: The Rules That Break QueriesThree-valued logic, why NOT IN returns nothing, COUNT(*) vs COUNT(col), and how NULLs change joins and aggregates.2 min
- 3Window Functions Every Data Engineer UsesDeduplication, latest-record-per-key, running totals and gaps — the window patterns that show up in every pipeline and interview.3 min
- 4SQL Logical Query Order: Why WHERE Can't See Your AliasSQL is written SELECT-first but evaluated FROM-first. Knowing the logical order explains alias errors, HAVING vs WHERE, and where window functions run.4 min
Next · intermediate2
- 5Indexes and Query Plans: Why a Query Is SlowRead an EXPLAIN plan, understand when an index helps, and the common reasons a database ignores the index you created.2 min
- 6Join Fan-Out: How a Correct Query Returns Wrong RevenueJoining two child tables of the same parent multiplies rows. Learn to state the grain of every table and aggregate before you join.3 min
