delete from b where b.rowid in (select t1.rowid from b as t1, b as t2 where t1.id = t2.id and t1.rowid > t2.rowid)