Intro to SQL

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.

Quick start

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

Cheat sheet

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).

Modules

#ModuleSample 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

Companion courses

Source: github.com/fhoces/sql-industry-prep