Reputation: 295
Let's say I have a table which contains cities and names. But in a city, the names are duplicate. How can I count the duplicate names which belong to every distinct city?
Upvotes: 0
Views: 40
Reputation: 1337
select count(name) from Table group by CITY having count(*) > 1
Upvotes: 1