8 levels. Built for a data engineering career. Banking and stock market examples throughout. No filler.
SELECT, FROM, WHERE, JOINs, ORDER BY. The anatomy of every SQL query.
LEVEL 02GROUP BY, HAVING, aggregate functions, CASE WHEN, COALESCE, date functions.
LEVEL 03Scalar, inline, correlated subqueries. WITH clause, recursive CTEs. EXISTS vs IN.
LEVEL 04ROW_NUMBER, RANK, LAG/LEAD, running totals, moving averages, NTILE.
LEVEL 05FULL OUTER, CROSS, SELF, non-equi joins. UNION, INTERSECT, EXCEPT/MINUS.
LEVEL 06EXPLAIN PLAN, indexes, partitioning, materialized views, anti-patterns.
LEVEL 07SCD Type 1 & 2, MERGE/UPSERT, incremental loads, deduplication, pivot, JSON.
LEVEL 08Gaps & islands, session analysis, cohort retention, ROLLUP, mock interview questions.
Every level uses the same two core tables so you can focus on SQL, not on understanding new data.
-- Table 1: transactions
txn_id | account_id | txn_date | txn_type | amount | status | branch
-- Table 2: accounts
account_id | customer | segment | city
-- Table 3 (L4+): daily_stock (NSE)
symbol | trade_date | open | high | low | close | volume