PostgreSQL

Learn SQL in the order it actually makes sense

One site, five steps — from your first CREATE TABLE through subqueries and the function reference, then 379 practice problems that check themselves against your real profiles, and a timed round to finish.

5steps
73worked problems
459function examples
379practice problems
100quiz questions

The path

Work through it top to bottom. Step 2 is a reference rather than a lesson — open it once and leave it open, because every step after it will send you back there.

  1. 01
    Start here

    Practice workbook

    Write your first statements, and watch them run.

    73 worked problems across 17 units. Read the question, the answer types itself out in the editor, then you run it and see the exact result — with the table's structure diffed before and after beside it. Covers CREATE, the full ALTER set, TRUNCATE/DROP, INSERT with upserts, SELECT, UPDATE, DELETE, transactions and GRANT/REVOKE, then a chapter on functions.

    • 73 problems
    • 17 units
    • DDL · DML · TCL · DCL
    Open the workbook
  2. 02
    Reference · keep it open

    Function reference

    Look up any function and see what it really returns.

    459 built-in functions across 21 categories, each with a runnable example and the output it actually produces — every result was captured by running the query against PostgreSQL 16.14, not written from memory. Search by name, signature or description, and mark entries off as you read them.

    • 459 functions
    • 21 categories
    • executed output
    Open the reference
  3. 03
    Concept

    Inner query, outer query

    Subqueries, taken apart one row at a time.

    The dataset stays on the left the whole way through. As the trace steps forward, exactly the rows the inner query touches light up — so you watch a correlated subquery re-run once per outer row instead of being told that it does. Thirty-five steps across EXISTS, IN, scalar and correlated subqueries.

    • 35 steps
    • EXISTS · IN · correlated
    • row-by-row trace
    Open the walkthrough
  4. 04
    Practice

    The roadmap

    Now do it 379 times.

    The practice set, ordered as a teaching sequence rather than by problem number. Tick problems off as you solve them, and the leaderboard ranks on solves confirmed against your real LeetCode and HackerRank profiles — so a ticked box earns points on the page but no position on the board.

    • 379 problems
    • 14 chapters
    • 323 LeetCode · 56 HackerRank
    Open the roadmap
  5. 05
    Test yourself

    Rapid fire

    100 questions. Twenty seconds each. No going back.

    A timed round across the whole syllabus — data and DBMS, schema and keys, DDL/DML/TCL/DCL, querying, PostgreSQL functions and NULL handling. A correct answer scores 10, plus up to 5 more for speed; running out of time scores 0. Your result goes to the class sheet when the round ends.

    • 100 questions
    • 20s each
    • 4 options
    Start the round

How to use it

The path works on your own, but it was built to be taught from.

Steps 1 and 3 project

Both are keyboard-driven — arrow keys or space to advance — and F goes full screen from any page on the site. Type is sized to stay readable from the back of a hall.

Step 2 is not a lesson

Don't read the reference front to back. Open it in a second tab at step 1 and search it whenever a function comes up — it is the dictionary, and the path is the grammar.

Nothing here needs installing

Every page is static and opens in a browser. You only need your own PostgreSQL once you reach step 5 and start solving for real.