Learn SQL from zero

Short lessons with examples you can run and edit, then practice that is checked on hidden data. Free, and no account needed.

Stage 1: Basics

Read data out of a table: pick columns, filter rows, sort them, and deal with missing values.

Stage 2: Filtering

Combine conditions, match lists, ranges and patterns, and turn values into labels with CASE.

Stage 3: Aggregation

Summarise many rows into one: counts, totals and averages, per group, and filter the groups.

Stage 4: Joins

Combine tables through their keys: inner and left joins, a table joined to itself, and joins with aggregates.

Coming soon