The fastest wayto actually learn SQL.
Schema School guides you from your very first SELECT to query plans, window functions, and modern PostgreSQL. Read the concept, watch the animated diagram, then practice on a real live sandbox — no setup, no downloads.
Syllabus
Fall term · self-paced
Read it. See it. Do it.
Every lesson follows the same five steps — so you build real understanding, not just syntax you'll forget.
Read the concept
Every lesson starts with a clear explanation — what the idea is, when you'd use it, and a real-world example. You understand before you type a line of SQL.
Watch it animated
48 animated diagrams show exactly what SQL does to your rows — joins pulling tables together, GROUP BY collapsing them, window frames sliding across results.
Practice on a real database
Write your query in a smart editor with autocomplete. Hit run — your SQL executes against a real sandbox and you get instant, row-by-row feedback.
Ask the AI tutor
Stuck? Ask in plain English. The AI reads your actual table structure, so its answer is accurate for your schema — not a generic guess.
Track your progress
Your streak, XP, and completed chapters stay with you. A gamified roadmap shows exactly where you are and what to tackle next.
Seven chapters. One clear path.
Start at Chapter 1 — no prior SQL knowledge needed. Each chapter builds directly on the last, taking you all the way to production-grade PostgreSQL.
Foundations
CH 01SELECT, INSERT, UPDATE, DELETE — everything you need to read and write data from day one.
5 lessons
Filtering & Joining
CH 02Narrow rows with WHERE and combine tables with JOINs — the two most-used SQL skills.
4 lessons
Functions & Aggregates
CH 03Strings, dates, math, NULLs, CASE, GROUP BY — transform and summarise any dataset.
7 lessons
Window Functions
CH 04Running totals, rankings, and comparisons — without collapsing rows. One of SQL's most powerful features.
4 lessons
Advanced SQL
CH 05CTEs, views, and subqueries — patterns that make complex queries readable and reusable.
8 lessons
Performance
CH 06Why queries are slow, how indexes fix them, and how to read EXPLAIN plans like a pro.
5 lessons
Modern PostgreSQL
CH 07JSON, full-text search, UPSERT, arrays — the Postgres-specific features used in real production apps.
4 lessons
Everything you need to go from zero to advanced — 100% free
Chapters
From your first SELECT to advanced Postgres
Lessons
Concept, when to use it, real-world example
Graded exercises
Write real SQL, get instant feedback
Animated diagrams
See exactly what each clause does to your rows
Stop guessing. See it happen.
SQL is hard to picture from code alone. Every lesson includes a diagram that animates exactly what a clause does to your rows — joins, GROUP BY, window frames and more.
Joins
Watch INNER, LEFT, RIGHT and FULL joins pull matching rows from two tables into one result.
Group By
See many rows collapse into a single grouped summary — and understand why the result looks the way it does.
Window Functions
A sliding frame moves across your rows, computing values without collapsing them — unlike GROUP BY.
Execution Order
SQL doesn't run top to bottom. This diagram shows the real order — and why it matters for column aliases.
Subqueries & CTEs
An inner query feeds results to the outer query. See how they nest and how CTEs make the logic readable.
Aggregates
SUM, AVG, COUNT — each one shown reducing a set of rows down to a single number, step by step.
Stuck? Just ask in plain English.
The built-in AI assistant reads your actual table structure and column names — so when you ask “top 5 customers by order value this year”, it writes correct SQL for your schema. Not a generic example. Not a guess.
- Schema-aware answers
Reads your live tables and columns before answering — no hallucinated field names.
- Powered by Groq
Fast responses via Groq's hosted inference. Switch to a local Ollama model any time.
- Your choice of model
Llama, Gemma, Qwen and more — switch providers with a single config change.
- Available everywhere
Use it inside lessons, in the SQL playground, and in the database browser.
Schema School Assistant
Groq · schema-aware · DBA tool
You
Top 5 customers by total order value in 2025
SELECT c.name, SUM(oi.quantity * oi.unit_price) AS total FROM customers c JOIN orders o ON o.customer_id = c.id JOIN order_items oi ON oi.order_id = o.id WHERE EXTRACT(YEAR FROM o.placed_at) = 2025 GROUP BY c.name ORDER BY total DESC LIMIT 5;
Generate
Describe what you want in plain English — get back working SQL that matches your schema.
Explain
Paste any query and get a plain-English explanation of what it does, step by step.
Optimize
Get up to three concrete ways to make a query faster, with reasons for each.
Fix
Paste a broken query — get back the corrected version plus a one-line explanation of the bug.
Built for learning. Not just reference.
Schema School is a complete learning environment — curriculum, animated diagrams, graded exercises, AI tutor, and a live database — all in one free app.
Free — no credit card, ever
The full curriculum, all animated diagrams for the first two chapters, every exercise, the AI tutor, and the database browser are 100% free.
Zero to advanced, gap-free
Seven chapters, 37 lessons — each one builds on the last. No gaps that send you Googling, no assumed prior knowledge.
48 animated diagrams
Joins, GROUP BY, window frames, execution order — every tricky concept is animated so you see it working, not just read about it.
70+ exercises with instant grading
Write a query, hit run. Your SQL executes against a real sandbox and is compared to the expected answer instantly. Hints are available if you get stuck.
Five realistic practice datasets
E-commerce, finance, analytics, maps, healthcare — real-sized data with proper indexes so your queries behave the way they would in production.
Smart editor with autocomplete
The editor knows your table names and columns. Start typing and hit ⌘ Enter to run — no copy-pasting into a separate SQL client.
Plug in your own database
Paste any PostgreSQL connection string and query your own data. Perfect for applying what you learn to a project you already care about.
Streaks & XP to keep going
Daily streak counter, XP, and achievements reward consistent practice. Short daily sessions add up far faster than marathon cramming.
Safe sandbox — experiment freely
The practice database is isolated and read-only for writes. Run whatever query you want without worrying about corrupting real data.
Common questions answered
Everything you need to know before you start — especially if this is your first time learning SQL.
No. Schema School is entirely browser-based. Create an account, and you get immediate access to a pre-loaded PostgreSQL sandbox — no Docker, no local setup required.
When you submit your query it runs against the sandbox alongside the reference answer. Results are compared automatically. If you're close but not right, you'll see a diff showing exactly where your output diverges.
Four things: Generate (English → SQL), Explain (SQL → English), Optimise (up to three concrete improvements), and Fix (corrected query + root cause). Available in lessons, the playground, and the DBA tool.
Your question and the relevant schema are sent to Groq to generate a response. Your actual data rows and exercise submissions are never sent to any AI provider.
Yes. The Playground and DBA tool both support Bring-Your-Own connections for PostgreSQL and MySQL. Connection strings are stored only in your browser's localStorage — never on our servers.
Yes — you can start for free and explore the first lessons. Lifetime Access is a one-time purchase that unlocks all 37 lessons, 70+ exercises, the AI assistant, the DBA tool, and everything we add in future.
Your first query is one minute away.
No setup. No credit card. Create a free account, open Chapter 1, and run real SQL against a live database right in your browser.