Online SQL Editor for Interviews
Test SQL knowledge on live data: create tables, fill them in, and ask the candidate to write a query — you both see the result right after it runs. Free and no sign-up, suited for analyst and back-end interviews.
Free, no sign-upCode sample
CREATE TABLE employees (id INTEGER PRIMARY KEY, name TEXT, dept TEXT, salary INTEGER);
INSERT INTO employees (name, dept, salary) VALUES
('Anna', 'dev', 250000),
('Boris', 'dev', 180000),
('Vera', 'qa', 150000);
SELECT dept, MAX(salary) AS top_salary
FROM employees
GROUP BY dept
ORDER BY top_salary DESC;
Output
┌──────┬────────────┐ │ dept │ top_salary │ ├──────┼────────────┤ │ dev │ 250000 │ │ qa │ 150000 │ └──────┴────────────┘
What the editor does
- SQLite 3.36: the whole script runs on the server against an in-memory database, and every participant sees the query result.
- Window functions are supported (ROW_NUMBER, RANK, SUM() OVER), along with common table expressions (WITH) and RETURNING.
- Real-time collaborative editing: up to 5 participants, with edits and cursors visible instantly.
- The problem statement is written in Markdown right in the session, next to the schema and query.
- After a free sign-in: a task bank, an interview mode with timers, candidate scoring, and interview history.
How to run the interview
- Click "Open the SQL editor" — the session is created with a sample: a table, data, and a query.
- Replace the sample with your own schema and test data, describe the task in Markdown, and send the link to the candidate — they need no sign-up.
- The candidate writes a query against your CREATE TABLE and INSERT statements and runs the whole script: you see the result together.
Typical interview tasks
- Find the second-highest salary — with a subquery, with LIMIT and OFFSET, or with a window function.
- Top-N records in each group using ROW_NUMBER() OVER (PARTITION BY …).
- LEFT JOIN: find customers with no orders and explain how it differs from NOT IN with NULL.
- Find duplicates using GROUP BY and HAVING and keep only one record.
- Compute a running total by date with the window function SUM() OVER.
- Compute user retention by signup month.
Limitations
- This is SQLite, not PostgreSQL or MySQL: there is no ILIKE, no schemas, no types like JSONB, and date functions work differently.
- The database is recreated on every run: write the schema and data in the same script, before the query.
- There are no autotests for SQL — check the query result against the expected one together with the candidate.
- A single run is limited to 3 seconds and 64 KB of output.
FAQ
- Which database engine is used?
- SQLite 3.36 with an in-memory database. Every run executes the whole script from scratch, so the result is reproducible.
- Where do the tables and data come from?
- Write CREATE TABLE and INSERT at the start of the script — as in the example on this page. The candidate writes their query below.
- Are window functions supported?
- Yes: ROW_NUMBER, RANK, DENSE_RANK, aggregates with OVER, and common table expressions with WITH.
- Can I test UPDATE and DELETE?
- Yes. The script runs in full, so add a SELECT after changing the data and you will see the result. RETURNING works too.
- Do I need to sign up?
- No. Create a session, send the link, and start. Signing in is only needed for the task bank, interview mode, and history.