Practical PostgreSQL for developers, one concept at a time.
The Art of PostgreSQL, one concept at a time. Every lesson here teaches a single idea with a runnable query and real data — then shows you where it fits in the bigger picture. Browse by topic, or start with the foundations.
What SQL really is, the relational model, and how to think in sets instead of loops.
6 lessonsOVER, PARTITION BY, frame semantics, and the analytical patterns — rankings, running totals, gaps & islands — that replace application-side loops.
5 lessonsGROUP BY correctness, GROUPING SETS, ROLLUP, CUBE, FILTER, and the multi-level CTE patterns that make complex reporting reliable.
3 lessonsINNER, OUTER, LATERAL, self-joins, join amplification traps, and WITH RECURSIVE — how PostgreSQL composes relations.
4 lessonsRead EXPLAIN fluently, understand plan node types, pick the right indexes, and rewrite queries the planner struggles with.
3 lessonsNormal forms, primary keys, foreign key constraints, and when JSON earns its place in an otherwise relational schema.
3 lessonsFrom the same source
Every lesson here is distilled from the book that teaches SQL to application developers. Get the complete treatment — all the variations, the real-world datasets, and the production patterns.
Get the Book — $89