转自:https://www.cnblogs.com/luohoufu/archive/2008/06/05/1214284.html
delete from people
where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
and rowid not in (select min(rowid) from people group by peopleId having count(peopleId )>1)