Home / SQL / Practice problems

SQL practice problems with instant checking

47 SQL exercises from easy to interview level, on one small online-shop database. Write your query in the page and press Check my answer: it runs in your browser and tells you exactly what is different from the correct result. Hints, the expected result and a solution are there when you need them.

Tables: customers(customer_id, name, city, country, joined) · products(product_id, name, category, price) · orders(order_id, customer_id, order_date, status) · order_items(order_id, product_id, quantity, unit_price)

Easy (18)

Medium (17)

Hard (12)