Search posts...
select id from points where (id,x) = (select id, max(x) from points) or (id,y) = (select id, max(y) from points) order by 1 asc
silver