Created
July 6, 2021 19:38
-
-
Save mbforr/ad8533763318bcc477c29656b1889f4c to your computer and use it in GitHub Desktop.
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, | |
st_area(state_geom) / 2.59e+6 as square_miles | |
from | |
`bigquery-public-data.geo_us_boundaries.states` | |
# we can order by any value in our table, or by a return value from a function | |
# we don't need to change it to square miles | |
# since we can just use square meters to order | |
# desc allows us to order by the area, in descending order | |
order by st_area(state_geom) desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment