delete from `tieba` where id in (select id from (SELECT *,count(`name`) as num FROM `tieba`group by `name`) as b where num>1)