iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

SQL Editor

iwantcoding.com ships an in-browser SQL editor — a real SQLite engine compiled to WebAssembly, with a sample shop database preloaded. Type SQL on the left, press Run », see the result on the right.

Open the SQL Editor » Opens in this tab. Use the browser Back button to return.

What you can do

  • Run any SELECT against the preloaded sample database.
  • Run INSERT, UPDATE, DELETE — they affect the in-memory DB until you click Reset DB.
  • Run CREATE TABLE, CREATE VIEW, DROP, ALTER — every DDL statement SQLite supports.
  • Stack multiple statements separated by ; — each result is shown in turn.
  • Pick from 16 ready-made Sample queries in the toolbar dropdown.

The sample shop database

TableRowsColumns
customers12id, name, email, country, active, created_at
products15id, category, name, price, stock
orders12id, customer_id, total, status, created_at
order_items20id, order_id, product_id, quantity, price
employees11id, name, manager_id, salary

Foreign keys are declared and customers like Ada Lovelace, Grace Hopper, and Linus Torvalds are in the data — so you'll see meaningful names in your joins, not customer_1.

Sample query — try this one

SQL
SELECT c.name, SUM(o.total) AS revenue
FROM customers c
JOIN orders    o ON o.customer_id = c.id
WHERE o.status = 'paid'
GROUP BY c.id, c.name
ORDER BY revenue DESC;

Keyboard shortcuts

ShortcutDoes
Ctrl+Enter (or Cmd+Enter)Run the SQL in the editor.
TabIndent (2 spaces).
Reset DB buttonDrop everything and reseed — undoes any UPDATE/DELETE.

What engine is it really running?

The editor uses sql.js 1.10 — a build of SQLite 3 compiled to WebAssembly. Everything happens inside your browser tab; no SQL leaves your machine. The same engine ships in iOS apps, Android apps, and embedded inside Laravel test runs.

Tip: SQLite is broadly compatible with standard SQL, but it has its own quirks — no real BOOLEAN, looser typing, and a few date functions of its own. Anything called out as "MySQL syntax" or "SQL Server syntax" in the lessons may need a small tweak before it runs here.

Example

Example
-- iwantcoding.com SQL editor — type SQL on the left,
-- click Run to see the result table.
SELECT 1 AS hello;
Try it Yourself »

Exercise

Editor uses a sandboxed engine called…

Engine:

Test yourself

Q1. Keyboard shortcut to run a statement is…
Q2. Editor uses the AI panel with…
Q3. Editor sandbox engine for examples is…

Discussion

Loading…