UPDATESQL

Unit 4, lesson 5 · Day of the week

Day of the week: DOW and ISODOW

Weekend orders this fall

EXTRACT(DOW FROM x) gives the day of the week as a number counting from Sunday: 0 is Sunday, 1 Monday, through 6 for Saturday. EXTRACT(DOW FROM DATE '2026-03-07') is 6, a Saturday. EXTRACT(ISODOW FROM x) counts the international way instead, from 1 for Monday to 7 for Sunday.

Example
SELECT order_date,
       EXTRACT(ISODOW FROM order_date) AS iso_weekday
FROM orders
WHERE EXTRACT(ISODOW FROM order_date) = 1
LIMIT 5;

Your task

Marketing wants to know if weekend promotions are worth it. List the id and order_date of every order placed on a Saturday or Sunday from October 1, 2026 onward, with the day number from EXTRACT(DOW ...) as weekday.

Tables you will use: orders

Try it in your browserFree, no sign-up. Your query is checked as you go.