Master SQL for Data Analysis
8 weeks · 4 milestones
Write and optimize complex queries across joins, CTEs, window functions, and indexes on a real production dataset.
Milestone map
Milestone map
0 of 4 done
Current milestone
Query a real database and answer a question
1–2 weeks. Finding and importing the dataset takes longer than the queries. Pick a dataset on a topic you care about — sports, music, public health, transport. The curiosity makes the queries write themselves.
Set up a local PostgreSQL or SQLite database, import a real public dataset (at least 10,000 rows), and write five queries that answer five different questions about that data. Each query must use SELECT, WHERE, and at least one aggregate function (COUNT, SUM, AVG, MIN, MAX). The questions must be ones you actually want to know the answer to — not "count all rows."
Proof required
Share a SQL file containing your five queries, each preceded by a comment stating the question it answers. Share a screenshot of each query running in a SQL client (DBeaver, TablePlus, or psql — not a browser toy) with the real result set visible. Write 150 words on one answer that surprised you — what did you expect, what did the data actually show, and what follow-up question did it make you want to ask?
What gets checked
- Five distinct queries — not five variations of SELECT * FROM table WHERE column = value
- Each query has a comment stating the specific question it answers — 'count rows' is not a question; 'which category has the most returns in Q3?' is a question
- The surprise reflection names a specific number or finding from the actual data — not a general observation about data analysis
Write JOIN queries across multiple tables
Aggregate, group, and transform data with CTEs and window functions
Answer a real business question end-to-end
Sign in to start this outcome and track your progress publicly.
Sign in to start this outcome →