REALISTIC TASKS. SYNTHETIC DATA.

Sample databases for learning SQL

Open a temporary browser copy, inspect its schema and experiment. These fixtures contain synthetic data only. Download the SQL to inspect or import elsewhere; opening a SQL file in SQLite Lab stages it without executing it.

Sample shop

Sales and customer relationships: 8 customers, 12 orders, 17 line items and 6 products.

customers(id, name, email, country, joined_at)
products(id, name, category, price)
orders(id, customer_id, ordered_at, status, total)
order_items(id, order_id, product_id, quantity, unit_price)

To get a .sqlite file, open this dataset and choose Download database in the workspace.

Warehouse inventory

Track stock across two warehouses, find shortages and summarize stock movements. Six products include one with no stock record.

warehouses(id, name)
items(id, sku, name, reorder_level)
stock(warehouse_id, item_id, quantity)
movements(id, item_id, warehouse_id, delta, moved_at)

To get a .sqlite file, open this dataset and choose Download database in the workspace.

Product analytics

Eight synthetic users and 600 deterministic events across January. Explore funnels, daily activity, JSON properties and window functions.

users(id, country, signed_up)
events(id, user_id, event_name, occurred_at, properties)

To get a .sqlite file, open this dataset and choose Download database in the workspace.

Choose a learning path · Find SQL examples · Export your results