Practice

SQL

SQLite in your browser, with a small sales database already loaded: customers, products, orders and order_items.

← All practice environments

Ctrl+Enter runs. Tab indents; press Esc, then Tab, to move on from the editor.

Output appears here.

The sample database
customers   (id, name, country, joined)
products    (id, name, category, price)
orders      (id, customer_id → customers.id, ordered_at)
order_items (order_id → orders.id, product_id → products.id, quantity)