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
4 milestones
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
Resources
Enroll free to unlock learning resources →Mastery
Mode SQL Tutorial
Mode's free SQL tutorial uses real data and frames every concept as a business question — exactly the mindset this outcome builds. Read after you've written your five queries to see how analysts frame questions.
Unlocks after completing Foundation + Depth