Skip to content

Instantly share code, notes, and snippets.

@kevinmcmahon
Created January 9, 2012 21:56
Show Gist options
  • Save kevinmcmahon/1585171 to your computer and use it in GitHub Desktop.
Save kevinmcmahon/1585171 to your computer and use it in GitHub Desktop.
Spatial query that finds all the landmarks in the 43rd Ward of Chicago.
SELECT landmarks.name, landmarks.architect, landmarks.address
FROM landmarks,wards
WHERE ST_Contains(wards.the_geom, landmarks.the_geom) AND wards.ward = '43';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment