SQL is the language of data, and if you work in Python, learning it will make you better at nearly everything you already do. This series walks you through SQL from first principles using DuckDB, a modern, local database that runs inside Python with no server setup. No credentials, no Docker, no configuration. Just Python and data.

What you’ll build

You generate your own practice database in post 3 (500 customers, then 1,000 orders) and use it for the rest of the series. By the end you will have written queries that filter, sort, group and join that data, tested them with pytest, read a query plan to find out why one was slow, and built a small ETL pipeline that pulls from an API into DuckDB.

How to read it

Each post builds on the one before, so go in order. Most take six to eight minutes to read and a little longer to type along with, which is the part that makes it stick. Tick the boxes below as you go; the page remembers them on this device.