Playground
SQL playground
This runs real SQLite, compiled to WebAssembly, inside the same network-isolated sandbox as every other language here. Every run starts with a brand-new, empty database, so create your tables and insert your rows in the same script as the queries that read them. How the sandbox works, and its honest limits, is on the code execution and security page.
SQLite 3.49.1 via sql.js 1.14.2
What to know about this SQL playground
It is real SQLite, which differs in a few ways from the database servers many jobs use:
- Every run starts from an empty database, and nothing is kept between runs. Put your CREATE TABLE and INSERT statements above the queries that read them.
- It speaks SQLite's dialect. Everyday SQL such as SELECT, JOIN, GROUP BY, subqueries, common table expressions and window functions works much as it does in PostgreSQL or MySQL, but some types and functions differ. For example, SQLite does not enforce a column's declared type unless the table is created as STRICT.
- Each statement that returns rows is printed as a table, showing up to 1,000 rows per query.
- There are no users, permissions or stored procedures, and no files or network to read from.
Ctrl/Cmd+Enter to run
Press Esc then Tab to move keyboard focus out of the code editor.
Ready
Output will appear here after you run your code.Not sure what to type?
A blank editor is the hard place to start. The SQL exercises hand you a program that already runs and ask you to change one thing.