SELECT DISTINCT is used when you want to strip out duplicate values and see only the unique ones. It's handy for building filter dropdowns, category lists, country lists, and tag lists.
sql
SELECT DISTINCT Country
FROM Customers;You should see
+---------+ | Country | +---------+ | Germany | | Mexico | | UK | +---------+ What this code does: There are two Mexico customers, but Mexico is shown only once. Common mistake: If you use DISTINCT across two columns, it checks distinctness on the whole column combination.