delete from temp where id in (select id from (select max(id) as id,count(url) as count from temp group by url having count >1 order by count desc) as tab )
用distinct把所有不重复的数据导出,然后清空表,重新导入刚才的数据。