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 | |
# this will create a new column using a function | |
# this won't be a part of the dataset, just the query itself | |
# we can calculate the area of the geometry in sq. meters | |
# then transform that using math to sq. miles | |
# we can also use a column alias here - as square_miles | |
# you can call this column anything you want, just change "square_miles" | |
st_area(state_geom) / 2.59e+6 as square_miles | |
from | |
`bigquery-public-data.geo_us_boundaries.states` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment