What you need first

Comfort with a terminal and one installed database. The course uses SQLite so nothing needs a server; PostgreSQL notes appear where syntax diverges. No prior SQL.

Modules

  1. Tables and SELECT. Create a table, insert rows, read them back. Column types and why SQLite is loose about them.
  2. WHERE and sorting. Filtering, comparison operators, NULL and the three-valued logic that makes = NULL fail.
  3. Joins. Inner, left, and the row multiplication that silently inflates a COUNT.
  4. Aggregates and grouping. COUNT, SUM, GROUP BY, HAVING, and the difference between filtering before and after aggregation.
  5. Subqueries and CTEs. Writing one result three ways and judging which a colleague could maintain.
  6. Indexes. Reading a query plan, why a leading wildcard defeats an index, and covering indexes.
  7. Transactions. Atomicity, isolation levels, and the retry loop every write path needs.
  8. Schema design. Normalisation to third normal form, then the denormalisation you will actually need.

How it is assessed

Each module ends with a query against a supplied dataset plus a written explanation of the plan. The final project is a small reporting schema with indexes justified in a comment block.

Questions people ask before starting

Do I need PostgreSQL?

No. SQLite covers every module. Where PostgreSQL differs — RETURNING, window frame defaults, index types — the module has a short note so you are not surprised later, but you never have to install it to finish.

Is SQLite a toy?

It is not, but the point is the language. Query shape, join fan-out, plan reading and index selection are identical across engines. Anyone who can tune SQLite can tune PostgreSQL within a week; the reverse is not true for someone who only memorised an ORM.

How long is each module?

Two to four hours for the reading and exercise. Module six needs a machine you can install SQLite on, and module seven assumes you can leave a terminal open, so plan those two for a desktop rather than a phone.

Where to go next

After the capstone, the useful direction is either deeper plan analysis or a move into schema migration under load. Both assume you can already write the query. If you want to keep going on the same dataset, add a covering index to the reporting query and measure the write cost it introduces, then argue in a comment whether the trade was worth it for an order table taking twenty writes a second.

SQL Query Editor

Type your SQL query and press Run Simulation to execute it against the pre-loaded sample database and see results instantly.

Rendered Output