Eleven self-contained tutorials. Tutorials 1–10 run live in the browser via WebAssembly. Tutorial 11 (Parquet) requires the native server.
Design a project-management schema with tasks, labels, and
assignments. Covers SERIAL, foreign keys,
CHECK constraints, ON CONFLICT
upserts, and RETURNING.
Build a sales pipeline and slice it with aggregation,
window functions, ROLLUP/CUBE,
and reusable views. Rank reps, compute running totals,
and generate subtotal rows.
Model sensor readings with timestamps and intervals.
Use DATE_TRUNC, EXTRACT,
AGE, TO_CHAR, recursive CTEs
to fill date gaps, and window frames for moving averages.
An e-commerce schema with users, orders, items, and products.
Walk through INNER, LEFT,
RIGHT, FULL, CROSS,
and NATURAL joins, plus correlated subqueries
and EXISTS.
Start with a v1 schema and evolve it: add columns, rename
fields, change types with CAST/::,
and wrap migrations in transactions with nested
BEGIN/COMMIT.
Model an org chart with self-referencing foreign keys and
query it with WITH RECURSIVE. Walk trees
top-down and bottom-up, track depth, aggregate subtrees,
and limit recursion depth.
Compare two warehouse inventories with UNION,
UNION ALL, INTERSECT, and
EXCEPT. Find shared products, exclusive items,
and aggregate combined stock.
Transform a product catalog with UPPER,
SUBSTRING, REPLACE, CONCAT,
ABS, ROUND, COALESCE,
NULLIF, and CASE WHEN.
Create B-tree indexes, use EXPLAIN to see
query plans, understand when indexes help and when they
hurt. Covers IF NOT EXISTS,
primary key indexes, and DROP INDEX.
Peek behind SERIAL to see sequences, create
custom sequences with START/INCREMENT,
and define ENUM types for fixed-set columns
with ordinal ordering.
Map Parquet files to SQL tables with
CREATE FOREIGN TABLE. Run joins,
aggregates, subqueries, and CTEs across Parquet data.
9 benchmarked workloads on 50K–200K row files.
Requires native server (not WASM).