delete from dupes where rowid in (select rowid from (select a.*,row_number() over(partition by name order by name) as rn from dupes a) where rn>1);