Beginner
Case 2 of 50
Case 002: The Expensive Orders
orders
Alex's first answer checked out — the manager is already back with the next question.
"I'm reviewing yesterday's sales — could you leave out the tiny orders and the one huge outlier, and pull what fell in the mid-to-high range, $2,500 to $5,000? I want to see what a normal, solid order actually looks like."
The data Alex is looking at
orders
| id | customer_id | product | amount | order_date |
|---|---|---|---|---|
| 101 | 1 | Keyboard | 2500 | 2026-01-05 |
| 102 | 3 | Mouse | 1200 | 2026-01-08 |
| 103 | 2 | Headphones | 3500 | 2026-01-10 |
| 104 | 4 | Monitor | 12000 | 2026-01-12 |
| 105 | 1 | Webcam | 4500 | 2026-02-03 |
| … 4 more rows | ||||
TASK
Help Alex answer the manager:
“Find every order worth between $2,500 and $5,000 (inclusive).”
Write a query above and hit Run to see what comes back.
No hints requested yet — click "Get a hint" when you're stuck.
Alex's final query — this is for reference. Copy it into your own thinking, not into the editor above.
SELECT *
FROM orders
WHERE amount BETWEEN 2500 AND 5000;
What that query returns
Case Debrief
Comparison operators, BETWEEN
- BETWEEN low AND high is inclusive on both ends — shorthand for column >= low AND column <= high.
- The plain operators (>, <, >=, <=, =, <>) still matter whenever you only need one side of a range.