Playground

SQL playground

Pick a sample database and write any SELECT against it. Your query runs server-side in a sandbox role with no write privileges.

Avatar rewards

What you can unlock

Clear practice challenges and pass all quizzes to unlock rare avatar styles.

Bronze Crest

Complete your first Beginner course

Silver Crest

Complete 2 total courses

Diamond Crest

Complete 3 total courses

Platinum Crest

Complete all 6 courses

Emerald Crest

Pass all course quizzes + complete all practice challenges

Golden Diamond Crest

Master everything — all courses, quizzes & practice

Practice Path

Challenges & quizzes

Pick a level for Clinical Care Performance, then work through challenges one at a time.

All doctors

Challenge 1 of 4 in Easy

PostgreSQL
EasyAll doctors

List all doctors' first name, last name, and specialty — sorted alphabetically by last name.

Autocomplete: start typing table/column namesRun: ⌘/Ctrl+EnterPaste supported
Read-only · SELECT only · 3 s timeout

No results yet

Run a query to see results here

Learning Map

Schema charts for each sandbox

Use these relationship maps to understand how tables connect before writing joins.

Enterprise Workforce Analytics

People, departments, and roles

employees

id · first_name · last_name · salary · department_id · job_id · hire_date

departments

id · name

jobs

id · title

Join paths

  • employees.department_id → departments.id
  • employees.job_id → jobs.id

Commerce Operations Intelligence

Customers, catalog, and orders

customers

id · first_name · last_name · email

orders

id · customer_id · order_date

order_items

id · order_id · product_id · quantity · unit_price

products

id · name · category_id · price · stock

categories

id · name

Join paths

  • orders.customer_id → customers.id
  • order_items.order_id → orders.id
  • order_items.product_id → products.id
  • products.category_id → categories.id

Clinical Care Performance

Care teams, patients, appointments

patients

id · first_name · last_name

doctors

id · first_name · last_name · specialty · department_id

departments

id · name

appointments

id · patient_id · doctor_id · appointment_date · status · reason

Join paths

  • appointments.patient_id → patients.id
  • appointments.doctor_id → doctors.id
  • doctors.department_id → departments.id

Quick tips

Best SQL tips & tricks

Full playbook →

Start with a row check

Run a small `SELECT * ... LIMIT 10` first so you verify columns and data shape.

Build joins incrementally

Add one table at a time and confirm row counts before adding the next join.

Name your outputs

Use clear aliases like `AS total_revenue` so your results are easy to reason about.

Use CTEs for clarity

Break complex logic into steps with `WITH` blocks to debug each part quickly.

Validate with counts

Compare `COUNT(*)` before/after filters and joins to catch accidental row multiplication.

Order your final output

Use explicit `ORDER BY` for deterministic grading and predictable result review.

Built from learner feedback

What learners asked for, now built in

Thea

I wanted clear tasks I could complete in sequence, then repeat with confidence. Joins were still the hardest part.

Sarita

I needed logical reasoning and plain-language explanations for each command so I could remember it long term.

Transparent tasks

Every lesson and challenge has explicit goals, expected output shape, and practical context.

Reasoning-first explanations

We teach the logic behind SQL clauses, not just syntax, so learners can apply patterns in real work.

Repeatable completion loops

Learners can re-run exercises, guided hints, and challenge levels to reinforce skills quickly.