About the SQL compiler
Query a SQLite database right in your browser. Run SQL code in your browser with no install and no signup — the editor, the input and the output share one screen. SQL compiles and runs on your own device through WebAssembly, so once the page has loaded it keeps working without a network connection.
Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.
A SQL example
This is the program the SQL editor opens with — run it as it is, then change it.
-- SQLite: Lightweight SQL database (runs in browser)
CREATE TABLE movies (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
year INTEGER,
genre TEXT,
rating REAL
);
INSERT INTO movies (title, year, genre, rating) VALUES
('The Matrix', 1999, 'Sci-Fi', 8.7),
('Inception', 2010, 'Sci-Fi', 8.8),
('The Godfather', 1972, 'Crime', 9.2),
('Pulp Fiction', 1994, 'Crime', 8.9),
('Interstellar', 2014, 'Sci-Fi', 8.6);
-- Query with aggregation
SELECT genre, COUNT(*) as count, AVG(rating) as avg_rating
FROM movies
GROUP BY genre
ORDER BY avg_rating DESC;
More Databases compilers
Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.