Created
February 13, 2019 14:25
-
-
Save speeddragon/1cbc733ac41493e677a4fa58e55225e9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_DWithin(ST_GeographyFromText('POINT(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