Orders in the Last 7 Days
Easy
Date Arithmetic
Treat 2026-10-06 as today. Return the ids of orders placed within the last 7 days, meaning from 2026-09-30 up to and including 2026-10-06. Order by id.
Table schema
Orders(id INT PRIMARY KEY, order_date DATE)Sample data
id | order_date
1 | 2026-09-29
2 | 2026-09-30
3 | 2026-10-06
4 | 2026-10-07
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.