I have a table where cityName is a column.
I want to find if there are same cityName exists and if so how many count for each entry.
What is the query ?
that will give you all duplicates and number of them
select count(cityName) as num, cityName
group by cityName
... but HAVING comes after GROUP BY
This topic is now closed. New replies are no longer allowed.