Unit 2, lesson 1 · DISTINCT
Removing duplicates with DISTINCT
Which cities are we in?
SELECT DISTINCT returns each different row once. With one column, that gives you the list of different values in it, which is a quick way to see what a column contains.
SELECT DISTINCT category
FROM products;Your task
Before opening a new store, the team wants the list of cities our customers live in. Show each city once.
Tables you will use: customers
Try it in your browserFree, no sign-up. Your query is checked as you go.