Created
February 13, 2019 14:24
-
-
Save speeddragon/987eb822f7a4dd0e9da9db542d380f7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT id, ST_Distance_Sphere(ST_MakePoint(112.15769, 25.28552), r0."location") AS distance | |
FROM "restaurant" AS r0 | |
WHERE ST_Distance_Sphere(ST_MakePoint(112.15769, 25.28552), r0.location) < 400 | |
ORDER BY distance | |
LIMIT 20 OFFSET 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment