Free to start · PostgreSQL · Runs in your browser

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.

7
chapters
37
lessons
48
diagrams
100%
free

Syllabus

Fall term · self-paced

v1 · 2026
CH 01Foundations
CH 02Filtering & Joining
CH 03Functions
CH 04Window Functions
CH 05Advanced SQL
CH 06Performance
CH 07Modern PostgreSQL
7 chapters · 37 lessons · 48 diagrams · 70+ exercises
How every lesson works

Read it. See it. Do it.

Every lesson follows the same five steps — so you build real understanding, not just syntax you'll forget.

step 01

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.

step 02

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.

step 03

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.

step 04

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.

step 05

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.

By the numbers

Everything you need to go from zero to advanced — 100% free

0

Chapters

From your first SELECT to advanced Postgres

0

Lessons

Concept, when to use it, real-world example

0+

Graded exercises

Write real SQL, get instant feedback

0

Animated diagrams

See exactly what each clause does to your rows

48 animated diagrams

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.

AB

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.

FROMWHEREGROUPHAVINGSELECTORDER

Execution Order

SQL doesn't run top to bottom. This diagram shows the real order — and why it matters for column aliases.

OUTERINNERSELECT ...

Subqueries & CTEs

An inner query feeds results to the outer query. See how they nest and how CTEs make the logic readable.

1279154Σ = 47

Aggregates

SUM, AVG, COUNT — each one shown reducing a set of rows down to a single number, step by step.

Browse all 48 diagrams First two chapters free · no account needed
AI tutor · runs locally · free

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

llama-3.3-70b

You

Top 5 customers by total order value in 2025

Generated SQL
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;
Result · 5 rows · 18 ms
Ada Lovelace$12,480.50
Grace Hopper$10,902.00
Linus Torvalds$ 9,640.75
Edsger Dijkstra$ 8,210.10
Donald Knuth$ 7,884.40

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.

What you get

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.

FAQ

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.

Community

Learn together, grow faster

Ask questions, share solutions, and discuss SQL with a community of learners — all moderated and indexed by topic.

Be the first to post

The community forum is open and waiting for you. Start a thread, ask a question, or share a tip.

Ready to join the conversation?

Sign in to post, reply, and connect with other SQL learners.

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.