Beginner#04 · Date ranges

March orders

Finance is closing the books for March 2026. Return the order_id and order_date of every order placed in that month, oldest first.

Write your query in the lab. It runs in your browser and tells you exactly what's wrong if it doesn't match.

Solve it in the lab

Hints

Hint 1

Dates are stored as text like '2026-03-14', so they sort and compare correctly.

Hint 2

Try order_date BETWEEN '2026-03-01' AND '2026-03-31'. If two orders share a date, break the tie with order_id.

Expected output

Your result should match this, in this order (8 rows).

order_idorder_date
832026-03-04
842026-03-08
852026-03-16
862026-03-21
872026-03-24
882026-03-26
892026-03-29
902026-03-31

Model answer

Show the solution
SELECT order_id, order_date
FROM orders
WHERE order_date BETWEEN '2026-03-01' AND '2026-03-31'
ORDER BY order_date, order_id;

Other queries that return the same rows are correct too. The lab checks your result, not your exact wording.

Next challenge: Customers per country →