2008-05-05 いらないデータを削除 PG delete a.* from a join (select p,q,max(r) max from a group by p,q) b on a.p=b.p and a.q=b.q where a.r<>b.max