SophiArch
BeginnerDS103

SQL for Data Analysis

Learn to query relational databases with SQL — and to audit the SQL that AI tools now write for you. This course covers filtering, aggregation, joins, CTEs, window functions, and cohort analysis on a realistic e-commerce dataset, with a focus on the silent failure modes that make a query return plausible but wrong numbers: double-counting joins, NULL traps, and misplaced filters. No Python or prior database experience required.

Lessons are AI-assisted and human-reviewed. Learn more.

Syllabus

Querying Fundamentals

01
Why SQL Still Matters in the AI EraFree preview
20 min
02
SELECT, WHERE, ORDER BY: Asking Precise Questions
30 min
03
Aggregation with GROUP BY and HAVING
30 min
04
Joins — and How They Silently Double-Count
40 min

Analysis Patterns

05
Subqueries and CTEs: Structuring a Real Analysis
35 min
06
Window Functions: Rankings, Running Totals, and Comparisons
40 min
07
Dates, Cohorts, and Retention Queries
40 min

SQL with AI

08
Auditing AI-Generated SQL: A Review Protocol
35 min
09
The SQL-to-pandas Handoff — Capstone Audit
40 min