Skip to content

Instantly share code, notes, and snippets.

@haydarai
Created June 1, 2015 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haydarai/293be4a473358941903e to your computer and use it in GitHub Desktop.
Save haydarai/293be4a473358941903e to your computer and use it in GitHub Desktop.
Requestnya Ardi
/* Nyari sekolah yang deket traffic light */
SELECT name, ST_DISTANCE(geom, (SELECT geom from public."traffic lights" WHERE gid = 10))
FROM
public."school and universities"
WHERE ST_DISTANCE(geom, (SELECT geom from public."traffic lights" WHERE gid = 10)) < 1000
ORDER BY ST_DISTANCE ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment