Learn data analyticsModule 3 of 4 · 0 done
SQL & statistical thinking
Query with SELECT, JOIN, GROUP BY and window functions — and reason about averages, variation and causation.
By the end you’ll be able to
- Write joins and aggregations
- Use a window function
- Avoid common statistical traps
SQL in five clauses
SELECT what, FROM where, WHERE which rows, GROUP BY how to bucket, ORDER BY how to sort. JOINs combine tables on keys; LEFT JOIN keeps every row from the left table. Window functions (ROW_NUMBER, SUM OVER) compute across rows without collapsing them.
- Check row counts after every join
- Use CTEs (WITH) to keep queries readable
- COUNT(DISTINCT …) for unique users
Averages lie
Means are pulled by outliers; medians aren’t. Always look at the distribution. Report variation (ranges, percentiles) along with central values.
Correlation is not causation
Two things moving together may share a cause or be coincidence. Only randomised experiments (or careful quasi-experiments) support causal claims. Watch for Simpson’s paradox when segments disagree with the total.
Answer your plan with SQL
Load your dataset into a free SQL playground (SQLite online, BigQuery sandbox).
Deliverable: Queries with results and a short findings note. Add it to your skills passport as a project when it’s done.
Check your understanding
Answer 3 scenario questions. Get 2 or more right to complete the module.
See how your sql scores
A free test adds SQL to your skill report and shows how close you are to the 75% job-ready target.