delete from `user`
where id in( SELECT * from(select id from `user` WHERE id not in (select min(id) from `user` group by names having count(names)>1) ) tep)

红色为查询出重复数据的id作为要删除的数据条件