Joins & Relations

INNER, OUTER, LATERAL, self-joins, join amplification traps, and WITH RECURSIVE — how PostgreSQL composes relations.

SQL is a language for composing relations. These lessons cover the JOIN operators that matter most in practice — including the LATERAL join that unlocks per-row subqueries, and WITH RECURSIVE for graphs and hierarchies — and the traps (amplification, NULL propagation) that catch developers off guard.

Paired course

Advanced JOIN Techniques

Go deeper with structured exercises, datasets, and production patterns.

See the Course

Go deeper

The Art of PostgreSQL

These lessons are the foundation. The book gives you the complete treatment, with real datasets you can run and the production patterns that turn thousands of lines of code into simple queries.

Get the Book — $89