Home / SQL / Practice problems / Easy

Cancelled orders

Easyrow order matters

Show the order_id and order_date of cancelled orders, most recent first.

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)

Your query
Show the expected result
order_idorder_date
292025-11-05
162025-08-16
502025-05-01
412025-04-27
442025-03-22
172025-03-17
372025-01-08

7 rows

Show a solution
SELECT order_id, order_date FROM orders WHERE status = 'cancelled' ORDER BY order_date DESC;

SQL used

New to SQL? The free SQL course teaches everything these problems use, with a self-checking exercise in every lesson.