Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- Given the id of a particular point, which points are within 1000
-- meters of that point?
select d2.id
from devices as d1
inner join devices as d2
on distance(d1.location, d2.location) <= 1000
where d1.id = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.