MySQL DISTINCT Clause
Eliminating duplicate rows from query results using SELECT DISTINCT.
-- Retrieve unique last names across employees table SELECT DISTINCT last_name FROM employees; -- Retrieve unique combinations of department and salary grade SELECT DISTINCT department_id, salary FROM employees ORDER BY salary DESC;
+----------+ | last_name| +----------+ | Doe | | Smith | | Williams | +----------+ 3 rows in set (0.00 sec)