I have a table with a varchar column, and I would like to find all the records that have duplicate values in this column. What is the best query I can use to find the duplic
SELECT
t.*,
(SELECT COUNT(*) FROM city AS tt WHERE tt.name=t.name) AS count
FROM `city` AS t
WHERE
(SELECT count(*) FROM city AS tt WHERE tt.name=t.name) > 1 ORDER BY count DESC