Online SQL compiler
This runs your query on a real database inside your browser tab. Your code never leaves this tab.
Press Run. The first run downloads the engine once, then your browser keeps it.
// Free tool
This runs your query on a real database inside your browser tab - not a syntax checker and not a shared server. Write SELECTs, JOINs, CTEs and window functions, press Run, and read the rows back in a few milliseconds.
Nothing you type is sent to a server. Your code is saved only in this browser, the engine is downloaded once and cached, and once it has loaded the page keeps running your code with the network off. No account, no sign-in, no limit on how many times you press Run.
// What you get
SQL database, in a browser tab
A real analytical SQL database, close to PostgreSQL, running in your tab. It is the same engine the graded SQL practice runs on.
What it supports
- Analytical SQL: CTEs, window functions, QUALIFY, LATERAL joins, list and struct types, and a PostgreSQL-compatible function set.
- Multiple statements in one run. CREATE TABLE, INSERT and UPDATE work, and the tables live until you reload the page.
- Result sets rendered as a table, with the row count and how long the statement took.
What it does not
- No files and no network: ATTACH and COPY cannot reach a disk, and nothing can read from a URL.
- A statement is stopped at 10 seconds. That is usually a join with no condition or a recursive CTE with no termination.
- Everything is in memory, and a reload is a fresh database.
// Why it runs here
Your code never leaves the tab
Most online compilers send your code to a server, run it in a container, and send the output back. That means a queue when the site is busy, a hard cap on how long your program may run, and a copy of your code on someone else's disk. This one downloads the compiler instead, once, and runs everything locally from then on.
No upload, no account
- The compiler is fetched once and cached; your source is never sent anywhere.
- Nothing is stored on our side. Your code is kept in this browser only, so it is still here when you come back.
- Once the engine has loaded, it keeps running with the network off, which a hosted sandbox cannot do.
Then practice it for real
- A runner tells you what your code printed. It cannot tell you whether you have learned anything.
- Prepshotz runs the same engines against real test cases and grades the result.
- Practice SQL with graded problems →
// The other nine
Every language we run, free
// Questions
SQL in the browser - FAQ
01Which SQL dialect does this run?
A SQL dialect that is close to PostgreSQL and covers the standard analytical surface: CTEs, window functions, QUALIFY, and the usual string, date and aggregate functions. Queries written for Postgres usually run unchanged; MySQL-only or T-SQL-only syntax will not.
02Can I create my own tables?
Yes. CREATE TABLE and INSERT work exactly as they would locally, and the tables stay available for the rest of the session. Reloading the page gives you an empty database again.
03Does my code get uploaded anywhere?
No. The compiler runs inside your browser tab, so your code never leaves your machine. There is no server to send it to and nothing is logged on our side. Your code is kept only in this browser, and a share link carries it inside the link itself.
04Is it really free, and do I need an account?
Yes, and no. Every tool here runs without an account, a card, or a sign-in. They are free because they cost us nothing per run: the compiler is downloaded to your browser once and your own machine does the work.
05Does it work offline?
Once the engine has loaded, yes: the page keeps running your code with the network off, because nothing it does needs a server. Opening the page needs a connection, but the engine stays cached, so a later visit skips the download.
// From the blog
SQL errors and how-tos, answered
- SQLSecond highest salary in SQL: queries that handle tiesFour ways to find the second highest salary in SQL, the tie that breaks LIMIT 1 OFFSET 1, returning NULL when there is none, and the Nth highest.
- SQLIs DataLemur free? What you get without payingWhich DataLemur questions are free, what Premium costs and adds, and when the free tier is enough for SQL interview prep, checked 14 Oct 2026.
- SQLColumn must appear in the GROUP BY clause: the PostgreSQL fixWhat PostgreSQL means by a column that must appear in the GROUP BY clause, four fixes you can run, and how to get the whole top row in each group.