Skip Immediate Next Cordinate I have a table foo where x, y represents coordinates
How do I discard the immediate next coordinate while using select?

  x   |  y | value 
------+-----+-------
   32 | 10 |     7
   32 | 11 |     2
   32 | 15 |     2
   32 | 16 |     5
   32 | 21 |    25
   33 | 17 |    57
   33 | 21 |    83
   33 | 22 |    86


Output

  x   |  y | value 
------+-----+-------
   32 | 10 |     7
   32 | 15 |     2
   32 | 21 |    25
   33 | 17 |    57
   33 | 21 |    83


Here cordinates (32,11), (32,16), (33,22) were skipped since they have an immediate previous coordinate (32,10) -&gt; (32,11), (32,15) -&gt; (32,16), (32,21) -&gt; (33,22)

Is this possible using a query? 
I am using Postgres
You want to filter out those rows for which a row with the same x and the previous y exists:

SELECT *
FROM my_table
WHERE NOT EXISTS (SELECT *
                  FROM my_table AS previous
                  WHERE (previous.x, previous.y )
                      = (my_table.x, my_table.y - 1));