Skip to content

Instantly share code, notes, and snippets.

@anhqle
Forked from andybega/subset.sql
Created November 13, 2013 00:11
Show Gist options
  • Save anhqle/7441157 to your computer and use it in GitHub Desktop.
Save anhqle/7441157 to your computer and use it in GitHub Desktop.
CREATE TABLE afg_greg AS
SELECT *
FROM greg
WHERE ( ST_contains((SELECT the_geom FROM afg_adm0), geom) OR
ST_overlaps((SELECT the_geom FROM afg_adm0), geom) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment