you can use this to check the count of unique items in a column: SELECT COUNT(DISTINCT column_name) AS some_alias FROM table_name