Guide

How to use Schema School

Everything is free to start — no credit card, no install. Open your browser, create an account, and start writing real PostgreSQL queries in seconds. This guide walks through every feature so you get the most out of the platform.

Lessons & the roadmap

The /learn page is your roadmap. Seven chapters take you from your first SELECT all the way through window functions, CTEs, indexes, and query plans — 37 lessons and 70+ graded exercises in total.

  1. 1Go to /learn to see all chapters laid out in order. Each chapter card shows your mastery progress and a difficulty badge (Beginner → Expert).
  2. 2Click any unlocked lesson card to open the lesson. You will see four structured sections: Theory (the concept explained plainly), When to use it, When not to use it, and a Real-world example.
  3. 3After reading the theory, work through the graded exercises below it. Each exercise shows a prompt and a code editor pre-filled with starter SQL. Write your query, then hit Submit to check it — you get instant feedback and a diff if your result is close but not quite right.
  4. 4Solve all exercises in a lesson to unlock the next one. Concept-only lessons (no exercises) have a Mark complete button at the bottom instead.
  5. 5Each daily solve extends your streak. Milestones earn you achievements (visible on your profile). Your overall progress bar lives on the roadmap page next to each chapter.

The first two chapters are always free. Chapters 3–7 are unlocked with a one-time lifetime purchase — see the Accounts & Pricing section below.

The Sandbox

Every query you run in lessons and the playground hits a real, live PostgreSQL database — the Sandbox. It’s a shared, read-only database that you can SELECT from freely; writes are blocked so nothing you do can break it for other learners.

The sandbox ships with five realistic datasets across separate PostgreSQL schemas:

  • publicE-commerceProducts, customers, orders, order items, and categories.
  • financeFinanceCustomers, accounts, ~200k transactions, securities, holdings, and trades.
  • chatbotChatbotUsers, conversations, ~200k messages, intents, and feedback ratings.
  • mapsMapsCities, 50k places of interest, 200k reviews, and users.
  • healthHealthHospitals, providers, patients, 100k visits, 60k prescriptions, and 80k lab results (all synthetic).

Lessons always run against the sandbox automatically. In the Playground you can also connect your own database — see the DBA Tool section for bring-your-own connections.

Playground

The /playground is a free-form SQL editor. No prompts, no grading — just you and the database. Autocomplete suggests table and column names from whichever dataset you’re querying.

  1. 1Open the Playground. By default it targets the sandbox (E-commerce schema). A tip bar at the top lists all five available datasets and their schemas.
  2. 2Type (or paste) any SELECT statement and press Run (or Ctrl+Enter / ⌘+Enter). Results appear in a table below the editor showing column names, row count, and query duration.
  3. 3To query your own Postgres database instead, paste a connection string into the connection field. The string is sent over HTTPS for that request only — it is not saved on this page.
  4. 4Stuck on a query? Press Ask AI next to the Run button. Describe what you want in plain English and the AI tutor will suggest SQL you can paste into the editor.

Animated Diagrams

The /diagrams section contains 48 animated explainers — one concept per diagram, from basic SELECT through indexes and query plans. Each diagram shows you what’s happening inside the database using step-by-step animation, with no SQL syntax required to follow along.

  1. 1Open the Diagrams page. The left sidebar lists all diagrams grouped by chapter. Use the sidebar to jump to any topic — or just hit Next in the viewer to walk through the full story in order.
  2. 2On mobile, tap the menu icon (top-left of the viewer) to open the diagram navigator drawer. Tap any entry to jump to that diagram.
  3. 3Each diagram shows an animated stage. When the animation finishes, press Replay to watch it again from the start — useful if you missed a step.
  4. 4Press Maximize to expand the diagram into a large fullscreen overlay for a cleaner view on desktop. Press Esc or the close button to exit.
  5. 5A progress bar at the top of the sidebar tracks how many diagrams you have viewed in this session.

The first two chapters of diagrams are always free. The remaining chapters are part of the lifetime unlock.

DBA Tool

The /dba page is a schema browser and natural-language query tool. Use it to explore the sandbox, or connect your own PostgreSQL or MySQL database (BYO).

  1. 1On the left you will see a Connections panel. The Sandbox connection is always available. To add your own database, click + Add connection, give it a label, choose Postgres or MySQL, and paste your connection string. Connections can be saved locally for the session.
  2. 2After selecting a connection, the schema tree below the connections panel loads automatically. Expand any schema to reveal its tables and views, then click a table name to view its columns, data types, and a live preview of the first rows.
  3. 3To run ad-hoc SQL queries, head to the Playground and paste your connection string there.
  4. 4Press the Ask AI button (bottom-right) to open the DBA AI panel. Type a question in plain English — for example, “Which customers placed more than 5 orders last month?” — and the AI will generate SQL, run it against your selected connection, and return the results with an explanation.
  5. 5All your AI conversations in the DBA Tool are saved per connection so you can scroll back through previous questions and results.

The shared sandbox is read-only — the DBA AI only runs SELECT statements against it. On a BYO connection you can optionally enable writes via the Allow writes toggle in the AI panel.

AI Tutor

Schema School has AI assistance in three places. All three use the same underlying model and stay focused on SQL — off-topic questions are politely declined.

Floating SQL Tutor widget

A green robot button is pinned to the bottom-right corner of every page. Click it to open the SQL Tutor chat panel. Ask any SQL or database concept question — joins, window functions, indexes, normalization, PostgreSQL vs MySQL differences — and get a concise, markdown-formatted answer with fenced sql code blocks you can copy. The chat panel keeps multi-turn context (up to 6 previous messages) so you can ask follow-ups naturally. Close with Esc or the X button. Works even when you’re not signed in.

In-lesson AI assistant

Inside a lesson, click the AI button next to the exercise editor to open a side panel. The assistant knows the current exercise prompt and your sandbox schema, so it can give hints that are relevant to what you’re working on without just giving away the answer.

DBA natural-language → SQL

In the DBA Tool, the Ask AI panel lets you describe what you want in English and get working SQL back — the model first reads your schema so it references only real tables and columns. Results run immediately and conversations are saved per connection. Free users get 100 AI chats in the DBA Tool included; beyond that a lifetime unlock is needed.

The floating SQL Tutor widget is rate-limited to 20 questions per hour per IP/user to keep things fair. If you hit the limit, it resets automatically after an hour.

Community Forum

The /community page is a simple forum where learners ask questions, share tips, and discuss SQL.

  1. 1Sign in, then type a title and body for your post in the New post form at the top of the page. Posts are text-only.
  2. 2Submit the form. Your post enters a review queue and will appear publicly once an admin approves it. You will see it in My posts while it is pending.
  3. 3Click any approved post to open the thread and read replies. To reply, type in the reply box at the bottom — replies go through the same review process before appearing.

All content is reviewed by an admin before it appears publicly. This keeps the forum spam-free. Most posts are approved within a few hours.

Accounts & Pricing

Creating an account is free and takes under a minute. No credit card is required to sign up.

Everything is free right now 🎉

All chapters, every diagram, the DBA tool, AI help, and the community are fully open — no purchase needed. Just create a free account.

Ready to start?

Create a free account and write your first SQL query in the next five minutes.

How to Use Schema School — Complete Guide · Schema School