Write real SQLin the next sixty seconds.
Open your browser and start typing. Every lesson explains the idea in plain words, shows you an animated diagram of what the query really does, then lets you practice on a live PostgreSQL database. No installs, no Docker, and nothing to configure.
| name | lessons |
|---|---|
| Priya | 9 |
| Marcus | 8 |
| Aiko | 7 |
DBA Workspace
postgres and mysql connected
Your databases, explored in seconds.
Schema School is more than a place to learn. It ships a full DBA workspace right in your browser. Connect your own PostgreSQL or MySQL, browse every table, run and format SQL, ask the AI in plain English, and export the results. No installs and no Docker.
- Bring your own database
Connect any PostgreSQL or MySQL instance. Credentials are encrypted with AES 256 on the server and locked behind a passphrase only you know.
- Browse in seconds
Click through schemas and tables with Data, JSON, and Structure views, plus built in pagination.
- Query and format
A real SQL editor with schema autocomplete and one click formatting, running against your live connection.
- Ask AI in plain English
Describe what you need. The assistant reads your schema, writes the SQL, runs it, and shows the rows.
- Export everything
Whole database SQL dumps, or CSV, Excel, and JSON archives for every table, in one click.
- Live ER diagrams
An interactive entity relationship map, generated for you, so you understand the data before you query it.
Read it. See it. Do it.
Every lesson follows the same five steps, so you build real understanding instead of syntax you'll forget.
Read the concept
Every lesson starts with a clear explanation of what the idea is, when you would use it, and a real world example. You understand before you type a line of SQL.
Watch it animated
54 animated diagrams show exactly what SQL does to your rows. You watch joins pull tables together, GROUP BY collapse them, and window frames slide across results.
Practice on a real database
Write your query in a smart editor with autocomplete. Hit run and your SQL executes against a real sandbox, with instant feedback on every row.
Ask the AI tutor
Stuck? Ask in plain English. The AI reads your actual table structure, so its answer fits your schema instead of being 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.
From rows to answers.
Every animated diagram in the course shows the data moving, so you understand what the query does, not just how to type it.
Filtering
WHERE keeps only the rows that match your condition. It is the foundation of every query.
Joining
JOIN stitches rows from two tables together on a matching key.
Aggregating
GROUP BY collapses many rows into one summary value per group.
Windowing
Window functions compute across a frame of rows without collapsing them.
Seven chapters. One clear path.
Start at Chapter 1 with 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, and DELETE. Everything you need to read and write data from day one.
5 lessons
Filtering and Joining
CH 02Narrow rows with WHERE and combine tables with JOINs. These are the two most used SQL skills.
4 lessons
Functions and Aggregates
CH 03Strings, dates, math, NULLs, CASE, and 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, and arrays. The Postgres features used in real production apps.
4 lessons
Everything you need to go from zero to advanced, free to start
Chapters
From your first SELECT to advanced Postgres
Lessons
The concept, when to use it, and a 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, which GROUP BY cannot do.
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
Watch SUM, AVG, and COUNT each reduce a set of rows down to a single number, step by step.
DSA that finally clicks.
Data structures and algorithms taught the honest way. Every lesson opens with a brute force that visibly dies, then an animation you control, then the one invariant that makes the fast solution safe. Quizzes, mastery tracking and real production stories are built in.
Watch the algorithm move
Every pattern is animated frame by frame. Scrub it, slow it down, step through it until the idea clicks.
Predict before it plays
The animation pauses at decision points and asks what happens next. Guessing first is how it sticks.
See the cost, live
Operation counters tick while the animation runs, so complexity is something you watch instead of memorise.
Arrays to graphs to DP
Over a hundred animated lessons in one atlas, from two pointers to Dijkstra to knapsack tables.
Learn by example.
Every topic comes with real queries you run against a live database, not toy snippets.
SELECT c.name, o.totalFROM customers AS cJOIN orders AS o ON o.customer_id = c.idWHERE o.total > 100ORDER BY o.total DESC;Joins
Combine rows from related tables. Master INNER, LEFT, and the edge cases that trip people up.
Stuck? Just ask in plain English.
The built in AI assistant reads your actual table structure and column names. So when you ask for the top five 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, so it never invents field names.
- Fast responses
Low latency hosted inference, with a local model fallback for development.
- Provider flexible
The underlying AI provider is swappable with a single config change, so there is no lock in.
- Available everywhere
Use it inside lessons, in the SQL playground, and in the database browser.
Schema School Assistant
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 and 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 and get back the corrected version with a short explanation of the bug.
A prompt for every SQL task.
Stop writing the same query from scratch. Here are 100 battle tested prompts for the things analysts and developers do every day. Joins, window functions, dedupe, cohorts, performance, JSON, and more. Copy one, swap in your own {{table}} and column names, and paste it into the AI assistant or your editor.
Top N per group
Return the top {{n}} {{column}} by total {{amount}} for each {{group_column}} in {{table}} using ROW_NUMBER() OVER (PARTITION BY {{group_column}} ORDER BY SUM({{amount}}) DESC).
Built for learning. Not just reference.
Schema School is a complete learning environment. Curriculum, animated diagrams, graded exercises, an AI tutor, and a live database, all in one app.
Free to start, no credit card
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 and 37 lessons, each one building on the last. No gaps that send you Googling and no assumed prior knowledge.
54 animated diagrams
Joins, GROUP BY, window frames, and execution order. Every tricky concept is animated so you see it working instead of just reading 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
Ecommerce, finance, analytics, maps, and 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 Cmd Enter to run, with 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.
A safe sandbox to 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 runs entirely in your browser. Create an account and you get immediate access to a preloaded PostgreSQL sandbox, with no Docker and 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 turns plain English into SQL. Explain turns SQL into plain English. Optimise suggests up to three concrete improvements. Fix returns a corrected query with the root cause. It is available in lessons, the playground, and the DBA tool.
Your question and the relevant schema are sent to our AI model to generate a response. Your actual data rows and exercise submissions are never sent to any third party.
Yes. The DBA tool supports Bring-Your-Own connections for PostgreSQL and MySQL. Connection strings are encrypted (AES-256) and stored securely on the server, then decrypted only to run your queries.
Learn together, grow faster
Ask questions, share solutions, and discuss SQL with a community of learners, all moderated and indexed by topic.
SQL Query Errors Due to Typing Mistakes and Incorrect Object Names
While writing SQL queries, I frequently encounter errors caused by simple typing mistakes. Common issues include misspel…
Optimizing Performance Under Pressure
How can I rewrite this slow-running query to eliminate a massive Converting to temporary table status and stop blocking…
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.