windowsxp — 2013-02-05T05:34:02-05:00 — #1
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 ?
gk53 — 2013-02-05T10:24:10-05:00 — #2
that will give you all duplicates and number of them
select count(cityName) as num, cityName
group by cityName
r937 — 2013-02-05T13:32:43-05:00 — #3
... but HAVING comes after GROUP BY