Cosmovex Tools

Need to work through SQL with someone? Run queries on a shared SQLite database

SQL playground with PairPad

The pad opens with shop.sql: four tables (customers, products, orders, order_items), sample rows and two queries, one with a LEFT JOIN and one with a window function. Press Run and SQLite executes the whole file in your browser; the result grids open in the SQL results pane and are shared with everyone in the room.

  1. Press Run (Ctrl/Cmd+Enter). The file runs top to bottom on a fresh in-browser SQLite database and the SQL results pane shows one grid per SELECT: revenue per customer, then the running total by day.
  2. Look at Noor Haddad in the first grid: 0 orders and 0.0 revenue. That row is there because of LEFT JOIN plus COALESCE; change the first join to an inner JOIN and run again to see it disappear.
  3. Press Share and send the link. Your partner edits the same shop.sql with a live cursor, and whoever presses Run writes the result grid into the room for both of you.
  4. Answer the questions in notes.md by adding queries at the end of shop.sql; each extra SELECT adds its own grid.
  5. Copy shop.sql when you are done; it runs unchanged in the sqlite3 command-line tool. With Pro you can download the room as a .zip.
online collaborative sql editor collaborative sql editorsqlite playground onlineonline sql playground with sample datasql playground with datashare sql query online
Open PairPad Free · Pro $29 one-time · no account

What to know

The database is SQLite compiled to WebAssembly (sql.js), running in a worker in the browser of whoever presses Run. Each Run starts from an empty database and executes the entire file, so the CREATE TABLE and INSERT statements at the top are your fixture and every person in the room gets the same result from the same text. Nothing is executed on a server, and there is no state left over from a previous run to confuse anyone.

Because it is SQLite, the dialect matters. Window functions (OVER, PARTITION BY, DENSE_RANK), common table expressions including WITH RECURSIVE, UPSERT with ON CONFLICT, RETURNING and the JSON functions all work. Types are flexible unless you declare a table STRICT, and date handling uses text with date() and strftime() rather than a DATE type. Postgres-only features such as ILIKE, SERIAL or schemas will fail with an error naming the statement number.

Each grid shows up to 500 rows to the room and reports the full count, which keeps a shared session readable when someone accidentally cross-joins two tables. A query that never ends, typically a recursive CTE without a stop condition, is stopped after five seconds or when you press Stop or Esc, and the editor stays responsive for everyone.

Teams use this for reviewing a query before it goes into a migration or a report, teaching joins, and pairing on an analytics question without giving anyone database credentials. Paste only sample data: the room text is stored so that the people with the link can join, and free rooms are deleted 24 hours after the last activity.

Updated · Cosmovex

Questions

Which database engine runs the SQL?

SQLite, compiled to WebAssembly and running in your browser. MySQL- or Postgres-specific syntax such as ILIKE, SERIAL or AUTO_INCREMENT spelling differences can fail; standard SELECT, joins, CTEs and window functions work.

Does the data persist between runs?

No. Every Run creates a new empty database and executes the whole file, so put your CREATE TABLE and INSERT statements at the top. That is what makes the result identical for everyone in the room.

Can I connect it to my own database?

No. PairPad never connects to a database server. Paste a schema and a few representative rows instead; that also keeps real customer data out of the shared room.

Can I import a .db or .csv file?

Not directly. Paste the CREATE TABLE statements and the rows as INSERT statements; sqlite3 can produce them with the .dump command.

How many rows can a result show?

Up to 500 rows per result set are shared with the room, with the total count shown, so large accidental results do not flood everyone's screen.

The free plan covers everything on this page. PairPad Pro ($29, paid once) is described on the PairPad page.