Created
December 9, 2015 23:45
-
-
Save parkercoleman/fd581490f66f10998a11 to your computer and use it in GitHub Desktop.
Maptime Seattle Postgis - Problem 3
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
WITH states_with_railroads AS ( | |
SELECT DISTINCT s.name | |
FROM geo.states_ne s | |
INNER JOIN geo.railroads_ne r ON ST_Intersects(s.geom, r.geom) | |
WHERE admin='United States of America' | |
) | |
SELECT DISTINCT s.name | |
FROM geo.states_ne s | |
WHERE admin='United States of America' | |
AND s.name NOT IN (SELECT * FROM states_with_railroads) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment