Group by having count 1. Group by sql. group by case sql. group by sql for example.