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 | |
state_name | |
from | |
`bigquery-public-data.geo_us_boundaries.states` | |
where | |
st_touches(state_geom, | |
( | |
select | |
state_geom | |
from | |
`bigquery-public-data.geo_us_boundaries.states` | |
where | |
state_name = 'Virginia')) | |
# this query will select all states that touch Virginia | |
# we can select the geometry of Virginia in a subquery | |
# which will return all the states it touches in our main query |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment