Maptime Seattle Postgis - Problem 4
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
SELECT p.name, MIN(ST_Distance(p.geom, c.geom, true)) * 0.000621371 AS distance_miles | |
FROM transport.ports_ne p | |
CROSS JOIN geo.coastline_ne c | |
WHERE ST_Within(p.geom, (SELECT geom FROM geo.countries_ne WHERE admin = 'United States of America')) | |
GROUP BY p.name | |
ORDER BY distance_miles DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment