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
idcustomer_idproductamountorder_date
1011Keyboard25002026-01-05
1023Mouse12002026-01-08
1032Headphones35002026-01-10
1044Monitor120002026-01-12
1051Webcam45002026-02-03
… 4 more rows
TASK

Help Alex answer the manager:

“Find every order worth between $2,500 and $5,000 (inclusive).”
SQL editor Ctrl+Enter to run
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.

Case closed.

Ready for the next one?

Next: Case 003 — The Almost-Right Name →