SQL Lab
Write and run any SQL against a sample shop database.
Starting PostgreSQL in your browser…
Press Control or Command plus Enter to run.
Results appear here. Each statement gets its own result.
Press Run query and the query plays through the database on its own. Pause, resume or replay it from the progress strip, and select any part of the scene to explain it in the inspector.
Query flow is an animated, simplified model. The hands-on labs, Practice, Visualize and Challenges run real PostgreSQL 18 inside this tab (PGlite): nothing is sent anywhere. The HNSW vector search lesson is an interactive simulation of pgvector's index on a fixed demo dataset.
The animation follows a SELECT, INSERT, UPDATE or DELETE on the users table (use the buttons above the editor); anything else can run in the SQL Lab:
SELECT … / UPDATE … / DELETE … WHERE id = <number>, or INSERT INTO users (name, email) VALUES (…)The users table holds ids 1-56. Try an id outside that range to see an empty result, or INSERT an id that exists to see a duplicate-key error.
It is a simplified model of PostgreSQL. Real databases add steps (locks, visibility checks, statistics, the OS cache) and the details differ by engine and configuration.
Write and run any SQL against a sample shop database.
Starting PostgreSQL in your browser…
Press Control or Command plus Enter to run.
Results appear here. Each statement gets its own result.