MySQL course

Free · no install · no sign-up

MySQL practice playground

Write and run SQL in your browser on the Learning Shop database — 4 related tables, or a large version with 4,000 orders. The database dropdown also lists the six real-life practice databases from the last six modules (hospital, bank, marketplace, college, rides, streaming), each with 2,000 rows. Changes stay in your browser; Reset database brings the original rows back.

The tables

A customer has many orders, an order has many order_items, and each order item points to one product. Revenue is quantity × unit_price for completed orders (6150.00 in the small shop).

Learning Shop tables and relationshipscustomers one-to-many orders; orders one-to-many order_items; products one-to-many order_items.customerscustomer_idPKcustomer_namecityemailordersorder_idPKcustomer_idFKorder_datestatusorder_itemsorder_idPK FKproduct_idPK FKquantityunit_priceproductsproduct_idPKproduct_namecategoryprice1N1N1N

customers.customer_id → orders.customer_id · orders.order_id → order_items.order_id · products.product_id → order_items.product_id

Show rows:

The playground runs a SQLite engine with a MySQL compatibility layer. Most MySQL syntax used in the course works; EXPLAIN output, WITH ROLLUP and user variables differ — run those in MySQL Workbench. Download the same data as MySQL scripts from any lesson’s Database step.