6-week course · Next cohort starts 3 February

Learn to write SQL you can actually read six months later.

Live demo of the Online Course template

Students working together at laptops
Students since 2023
1,900+
Average rating
4.9 / 5
from 640 reviews
Video, exercises and reviews
18 h
Finish the cohort version
92%

What you'll learn

By week six you will

  • Read a query plan without panicking

    Know which of the twelve lines matters and what to change first.

  • Model data that doesn't fight you

    Normalise where it helps, denormalise where it pays, and know the difference.

  • Write window functions from memory

    Running totals, rankings, gaps and islands — the patterns that come up in every analytics job.

  • Refactor a 300-line query

    Into CTEs and views a colleague can review. You'll do this to your own worst query in week 5.

  • Add the right index, once

    And know when the answer is 'no index — rewrite the query'.

  • Hold your own in a data conversation

    With analysts, backend engineers and the one person who remembers why that table exists.

Curriculum

Six weeks, one project

Each week: two 40-minute lessons, one exercise set, one live Q&A. You build one reporting database from scratch and improve it every week.

  1. 01

    Foundations, properly

    Week 1

    Joins as set operations, NULL semantics, and why your GROUP BY is wrong.

  2. 02

    Modelling

    Week 2

    Keys, constraints, normal forms in practice. Design the course project schema.

  3. 03

    Window functions

    Week 3

    Ranking, running aggregates, lead / lag, frames. The week people say changed their job.

  4. 04

    Query plans and indexes

    Week 4

    Read EXPLAIN, spot the sequential scan, fix it — or don't.

  5. 05

    Refactoring

    Week 5

    CTEs, views, materialised views. Bring your ugliest real query and we fix it together.

  6. 06

    Production habits

    Week 6

    Migrations, testing queries, and the checklist you'll actually use.

Instructor portrait

Your instructor

Taught by someone who still does this every day

I've spent twelve years as a data engineer and then as the person other engineers ask when a query is slow. I wrote this course after teaching the same six lessons to four different teams and realising they all needed exactly the same thing.

Every example is from a real system, with the names changed. There's no toy "employees" table here.

12
Years working with databases
30+
Teams trained in-house
14
Conference talks

Students

What past cohorts say

I'd been writing SQL for five years and thought I was fine. Week 3 alone paid for the course — I rewrote a report that used to take 40 minutes and it now runs in 3 seconds.
Priya Nair

Priya Nair

Analytics engineer

  • “The live Q&A is the reason to pick the cohort. Real questions, real plans, no hand-waving.”

    Jonas Lindqvist · Backend developer

  • “Finally understood indexes. Not memorised — understood.”

    Amara Okafor · Product analyst

  • “Our whole data team took it. We now review each other's queries. That didn't happen before.”

    Chen Wei · Head of data

Pricing

Two ways to take it

Both include lifetime access to the videos and every future update.

  • Self-paced

    Start today, go at your own speed.

    $249one-time

    • 18 hours of video
    • All exercise sets with solutions
    • Private community
    • Lifetime updates
  • Cohort

    Six weeks live with 30 people. Next start: 3 February.

    $690one-time

    • Everything in Self-paced
    • 6 live Q&A sessions
    • Weekly exercise review
    • Refactor your real query with me
    • Certificate of completion

Prices in USD. Team of 5 or more? Email for a group rate. 30-day refund on self-paced; cohort refundable until the second session.

FAQ

Common questions

Which database do you use?

PostgreSQL for every example. About 90% carries straight over to MySQL, SQL Server and BigQuery, and I point out the differences when they matter.

How much time per week?

Around three hours: 80 minutes of video, an hour of exercises, and the 45-minute live Q&A if you're in the cohort.

Is it beginner-friendly?

You should be able to write a SELECT with a JOIN and a WHERE. If you've never written SQL, start with the free lesson and see how it feels.

Can my company pay?

Yes. You get an invoice with VAT details immediately after checkout, and most students expense it.

What if I miss a live session?

Every session is recorded and up within a day. Post your question beforehand and I'll answer it in the recording.

Free lesson

Watch week 3, lesson 1 for free

The window functions lesson, no strings. You'll also get a short email when the next cohort opens.

Next cohort starts 3 February. 30 seats.

Or start the self-paced version in the next five minutes.