DISTINCT
Learn DISTINCT (SELECT Queries, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction DISTINCT removes duplicate rows from the result. Two rows are duplicates when every selected column is equal (NULLs count as equal for this purpose). COUNT(DISTINCT col) counts the unique non-NULL values.