Sunday through Saturday
- O(1) · Trivial
- Free
- SQL
- filtering
- comparisons
Problem
The store closes its books by the week, Sunday through Saturday. It's time for the second week of January 2026: Sunday, January 4, through Saturday, January 10, both days included.
For each order from that week, show three columns, in this order: its id, its date, and its quantity.
What it has to return
These rows, in any order
| id | placed | quantity |
|---|---|---|
| 2 | 2026-01-04 | 1 |
| 3 | 2026-01-04 | 5 |
| 4 | 2026-01-09 | 10 |
| 5 | 2026-01-10 | 1 |
This is what comes out with the data in the practice database this challenge uses. The column names don’t count, so name yours however you like: what counts is how many there are and the order they come in. Besides this one, the challenge has hidden tests with other data that are revealed when you submit your solution.
You start with this
SQL
SELECT id, placed, quantity
FROM ordersSolve this challenge
It opens in your browser, with the editor and the tests. It is free and you do not need an account to start.