MySQL查询某一字段数据重复的值

SELECT id,field1,COUNT(field2) as total 
FROM table_name
GROUP BY field1
HAVING total > 1