with t as (
select p1.id as pid
from person as p1, person as p2
where p1.email = p2.email and p1.id > p2.id
)
delete person from person, t
where person.id = t.pid
with t as (
select p1.id as pid
from person as p1, person as p2
where p1.email = p2.email and p1.id > p2.id
)
delete person from person, t
where person.id = t.pid