Skip to content
toolsdocks

Try SQL with a sample database

Write SQL and run it against a sample database, an empty one, or your own SQLite or CSV files. Everything runs in your browser.

Runs on your device
Loading tool…

How to use

  1. Use the sample database or open your own file.
  2. Write a query and press Run (Ctrl+Enter).
  3. Export results or download the modified database.

Worked example

SELECT country, COUNT(*) FROM customers GROUP BY country ORDER BY 2 DESC; on the sample database lists customers per country.

Supported formats and limits

Input.sqlite / .db, CSV (imported as a table), SQL scripts
OutputResult grid, CSV, Modified .sqlite
LimitsDatabase files up to 1 GB are accepted; the whole database is kept in browser memory, so the practical size depends on your device.
Enginesql.js (SQLite compiled to WebAssembly) in a Web Worker

Limitations

  • This is SQLite; some MySQL/PostgreSQL syntax differs.
  • The first 1,000 rows of a result are shown; CSV export includes up to 200,000 rows.

Questions

Which SQL dialect is used?

SQLite, compiled to WebAssembly (sql.js) and run in a Web Worker. Most standard SELECT, JOIN, GROUP BY and window-function queries work; some MySQL or PostgreSQL syntax and functions differ.

How are CSV files imported?

Each CSV becomes a table. Column types are inferred as INTEGER, REAL or TEXT, empty cells become NULL, and values with leading zeros such as 00123 stay TEXT.

Are my changes saved?

Changes live in memory on this page. Download the modified database as a .sqlite file to keep them; your original file is not changed.

Privacy

Runs on your device. Files and text are processed in this browser tab and are not uploaded.

See the privacy policy for how toolsdocks handles data.