Beginner
Case 4 of 50
Case 004: The Product Lineup
orders
Merchandising is putting together a catalog page, and the manager passes along their request.
"I don't need how many times each thing sold — could you just pull the list of every different product we've ever sold? No repeats."
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:
“List every distinct product that appears in the orders table, with no duplicates.”
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 DISTINCT product
FROM orders;
What that query returns
Case Debrief
DISTINCT
- DISTINCT removes duplicate rows from your result set.
- It works across multiple columns too — SELECT DISTINCT col1, col2 keeps only unique combinations of both together.