Skip to content

Instantly share code, notes, and snippets.

@aveek22
Created January 9, 2021 22:54
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 aveek22/6c105efe7b07f86518d8742e3bb037d6 to your computer and use it in GitHub Desktop.
Save aveek22/6c105efe7b07f86518d8742e3bb037d6 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE VIEW vw_mumbai_houses_airport_5km
AS
SELECT *
FROM mumbai_house_price_raw
WHERE 1=1
AND ST_DISTANCE(
ST_TRANSFORM(ST_GEOMFROMTEXT('POINT(72.874374 19.096713)',4326), 7755),
ST_TRANSFORM((geometry),7755)
) <= 5000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment