SQL Playground

Create tables, insert rows and query them. A real SQLite database living in your browser tab, with the schema and results shown as you go.

Updated

query.sql SQLite
Result

Tables

Try

  • CREATE TABLE your own, then insert into it — it stays until you reload.
  • A LEFT JOIN from artists: Nina Simone has a NULL country, so you can see how NULL behaves.
  • SELECT * FROM albums ORDER BY sales DESC LIMIT 3
  • A window function — RANK() OVER (ORDER BY sales DESC).

How it works

This is SQLite compiled to WebAssembly. The database lives in memory in this tab — nothing is uploaded, and a reload starts clean.

Ctrl/Cmd + Enter runs.

Learning SQL?

The Databases & SQL track works through the clauses in the order the engine actually applies them — which explains most of the errors people hit. Start with query execution order.