Why SQL?
SQL is the universal language of data. Every major database — PostgreSQL, MySQL, SQLite, BigQuery, Snowflake — speaks SQL. Whether you're a data analyst, engineer, or product manager, SQL is the single most valuable data skill you can learn.
Using the Minimal Viable Analytics (MVA) approach, you focus on just 6 skills instead of trying to memorise every SQL keyword. Think of it like building a house — you need a solid foundation (your data), 6 pillars (core skills), and a roof (the decisions you make).
The 6 Pillars — SQL Tutorials
Work through each pillar in order. Every tutorial is interactive — edit the SQL and run it directly in your browser. No database installation needed.
Grouping & Aggregation
Collapse rows into categories with GROUP BY and aggregate with COUNT, SUM, AVG. Filter groups with HAVING.
Filtering
Select subsets of data with WHERE, IN, BETWEEN, LIKE, and IS NULL. Paginate with LIMIT/OFFSET.
Sorting
Order results with ORDER BY, handle NULLs, and find top/bottom values with LIMIT.
Joining
Combine tables with INNER JOIN, LEFT JOIN, CROSS JOIN, and the anti-join pattern.
Creating Columns
Derive new columns with CASE WHEN, COALESCE, ROUND, CAST, and string functions.
Creating Graphs
Query data with SQL and visualise it with Chart.js — bar, line, pie, and doughnut charts.
How to Use These Tutorials
- Start with Pillar 1 (Grouping) — it introduces the dataset and core patterns
- Work through Pillars 2–5 — each builds on the same fundamentals
- Finish with Pillar 6 (Graphs) — bring your analysis to life visually
Each tutorial uses the same Australian petrol station dataset so concepts build naturally. By the end, you'll have the skills to tackle real data analytics problems with confidence.
Every tutorial runs in the browser using sql.js (SQLite compiled to WebAssembly). You write real SQL — the same syntax works in PostgreSQL, MySQL, BigQuery, and most other databases.
What You'll Learn
GROUP BY,COUNT(),SUM(),AVG(),HAVING— aggregate data by categoryWHERE,IN,BETWEEN,LIKE,IS NULL— filter rowsORDER BY,ASC/DESC,LIMIT— sort and find top valuesINNER JOIN,LEFT JOIN,CROSS JOIN, anti-join patternCASE WHEN,COALESCE,ROUND,CAST— create computed columnsChart.js— visualise SQL query results as charts
Same Skills, Other Languages
The MVA 6 pillars apply to every data tool. If you prefer a different language, we have the same tutorials for:
Ready to start?
Begin with the first pillar — grouping and aggregation with SQL.
Start Pillar 1: Grouping →