Đây là một tùy chọn
DELETE FROM votes T1
USING votes T2
WHERE T1.ctid < T2.ctid
AND T1.voter = T2.voter
AND T1.election_year = T2.election_year;
Xem http://sqlfiddle.com/#!15/4d45d/5
Đây là một tùy chọn
DELETE FROM votes T1
USING votes T2
WHERE T1.ctid < T2.ctid
AND T1.voter = T2.voter
AND T1.election_year = T2.election_year;
Xem http://sqlfiddle.com/#!15/4d45d/5