php artisan make:repository Dictionary_f http://cs.cc/email_data http://cs.cc/email_data_run select * from dictionary_fs where word_1 in (select word_1 from dictionary_fs group by id having count(word_1) > 1) and id not in (select min(id) from dictionary_fs group by word_1 having count(word_1)>1); select * from dictionary_fs where word_1 in (select word_1 from dictionary_fs group by word_1 having count(word_1) > 1) and id not in (select min(id) from dictionary_fs group by word_1 having count(word_1)>1); delete from dictionarys where id not in (select a.id from ((select min(id) id from dictionarys group by word_1) a)) 只要修改 表名dictionarys 字段名word_1 select * from people where people_no in (select people_no from people group by people_no having count(people_no) > 1) and id not in (select min(id) from people group by people_no having count(people_no)>1);