A 5-module SQL refresher built around interview-style questions for a ride-sharing analytical role. Every module is concept → code → 3-6 interview questions you should be able to write from a cold start in under two minutes each.
git clone https://github.com/fhoces/sql-industry-prep cd sql-industry-prep Rscript data/setup.R # build the SQLite database sqlite3 data/uber.sqlite < module-01/exercise.sql
One-page landscape reference card with execution-order palette, JOIN patterns, GROUP BY / aggregates, subqueries & CTEs, window functions, and an all-modules capstone: sql-cheatsheet.pdf (LaTeX source).
| # | Module | Sample Code |
|---|---|---|
| 1 | SELECT, WHERE, Aggregates — the 80% of SQL you'll use every day | M1 |
| 2 | JOINs — INNER, LEFT, anti-join, multi-table chains | M2 |
| 3 | GROUP BY, HAVING, Conversion Funnels — six analytical patterns to memorize | M3 |
| 4 | Subqueries and CTEs — organizing multi-step queries | M4 |
| 5 | Window Functions — the most powerful SQL feature for analytics | M5 |