查询出users表中name字段有重复的 name及重复次数 select name,count(id) as count from users group by name having count>1;