Online SQL playground
Write SQL and run it instantly on a real PostgreSQL or SQLite database, right in your browser. Three sample databases are loaded and ready: a pizza shop, an animal shelter and a music app. Nothing to install, no account needed.
Each run starts from a fresh copy of the sample data. To try your own tables, put CREATE TABLE, INSERT and your SELECT in one run.
Sample data, ready to query
Three small, realistic databases, loaded in both engines. Load one into the editor, or open its page for the full schema and a download.
Rocket Pizza
A small pizza shop with big data: customers, a menu and a month of orders.
customers (10) · menu_items (11) · orders (17) · order_items (32) · staff (8)
Paws & Whiskers Shelter
Twenty animals waiting for a home, and the people who adopt them.
pets (20) · adoption_requests (12)
Streamly
A small music streaming app: signups, listening sessions and subscriptions, January to mid-April 2026.
users (300) · plays (2407) · subscriptions (100)
Real engines, not a simulation
PostgreSQL runs as PGlite and SQLite as WebAssembly, so syntax, functions and error messages are the real thing.
Private by design
Your queries run in your browser tab. Nothing is sent to a server, and there's no account to create.
Share or embed
Share a query as a link that opens with your SQL in place, or embed a runnable example on your blog or course page.
Questions
Is my SQL sent to a server?+
No. Queries run locally in your browser tab. Shared links keep the query in the part of the URL after #, which browsers don't send to servers.
Which databases can I query?+
Three sample databases are loaded: Rocket Pizza (orders, menu, staff), Paws & Whiskers shelter (pets and messy adoption requests) and Streamly (users, plays, subscriptions). Pick one in the toolbar or with a Load button below.
PostgreSQL or SQLite: which should I pick?+
Most everyday SQL is identical. Pick the one you'll use at work; if you don't know, PostgreSQL is stricter, so habits learned there carry over everywhere. Switch any time and run the same query on both.
Is it free?+
Completely free, with no signup. sqlstreak makes money from optional Pro lessons, not from the playground.
Can I embed a runnable query on my blog?+
Yes. Click Embed to get a snippet. Readers can run and edit the query right on your page.
SQL guides
Joins, window functions, CTEs and more, with runnable examples.
SQL errors explained
What common PostgreSQL and SQLite errors mean and how to fix them.
Learn SQL daily
Five-minute lessons with instant feedback and a streak. Free to start.