SQL Query to select one set when there are duplicates To get the number of SLAs: select SLA, count(SLA) from table group by SLA