The foundational SQL patterns BI Analysts, Analytics Engineers, and Power BI / Tableau developers reach for every day — window functions, ranking, YoY / MoM comparisons, moving averages, cohort analysis, grain reasoning, and multi-CTE reconciliation — applied against a realistic company operations star schema with 10 planted data quality issues. The skills here transfer directly into every vertical path on caseSQL.
31 missions (10 free · 21 Pro incl. 5 Master) · star schema · window-fn + dimensional-modeling focus
Read the briefing
A Slack message from your manager
Explore the schema
5 tables in a star schema
Write your query
Full SQL editor with autocomplete
Get expert feedback
Graduated hints, not just pass/fail
A 5-table star schema (fact_sales, fact_targets + 3 dimensions) with trailing spaces, ghost regions, inactive employees, and casing drift — the exact patterns you’ll handle modeling real marts.
RANK, ROW_NUMBER, LAG, LEAD, NTILE, PERCENT_RANK, SUM() OVER with framed windows, moving averages, YoY pivots, and running totals — the window-function curriculum most interviews screen on.
Mission 26 (“Why is our leaderboard off by 12x?”) drills the canonical BI mistake: a clean query, the wrong grain, a 12× inflated total. Pre-aggregated CTEs as the fix.
The same window-function and grain-reasoning skills power Marketing, Finance, Provider, and Banking missions. Treat BI as the core, the vertical paths as the applied variants.
Each mission is a real request from someone at the company. Difficulty increases as you go.
A company operations star schema with 5 tables, 2,200+ rows, and 10 planted data quality issues. Trailing spaces that create phantom products, ghost regions that vanish from INNER JOINs, inactive employees inflating performance reports, and more.
●dimension tables ● fact tables
Window functions, star-schema joins, grain reasoning — on a dataset with planted traps.
Looking for something different?