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
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:

“List every distinct product that appears in the orders table, with no duplicates.”
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 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.

Case closed.

Ready for the next one?

Next: Case 005 — The Top Order →