Check Duplicate in MySQLSimple snippet: SELECT `name`, COUNT(`name`) as cnt FROM `members` GROUP BY `name` HAVING cnt > 1 ORDER by cnt;