Appearance
SELECT DISTINCT
The DISTINCT
clause filters out FULL DUPLICATE ROWS. It goes right after the SELECT
keyword, since it applies to the entire row, not single columns.
sql
-- select rows if the first name and country of a customer is unique
SELECT DISTINCT country, first_name
FROM Customers;
-- count the unique countries where customers are from
SELECT COUNT(DISTINCT country)
FROM Customers;