← Learn
Learn · SQL

Combining and summarizing

Ten lessons on turning tables into answers: GROUP BY and HAVING, keys and joins, LEFT JOIN and finding what’s missing, joining several tables without counting things twice, subqueries, CTEs, dates, and reports with CASE. Every query runs on the same sample shop and is checked as you type.

Part of the Data analyst (SQL) path.

Take first: SQL from zero.

More info

How it works

Each lesson is a short read with real queries and what they return, then practice questions. Most have you write a query: it runs as you type on a small shop database in your browser (SQLite), shows what it returns, and is marked right as soon as it returns the same rows as the answer. Any query that gets there counts, so there’s more than one right way. Some questions practise one idea and ask you to use it, like a JOIN or a window function. You can try again as often as you like; “Show the result to aim for” shows the rows you’re after, and after two misses there’s a button to show a query that works.

What do I need to know first?

SQL from zero, or knowing SELECT, WHERE, ORDER BY and COUNT. The first lesson recaps all of it, so you can start here.

The other AI and data engineering courses

Where is my progress saved? In this browser, like the rest of the site. Nothing to sign up for.