Created
August 11, 2021 19:54
-
-
Save mbforr/d52bc4b6e1343e58445eb8473771b41c 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
WITH | |
nyc AS ( | |
SELECT | |
* | |
FROM | |
PROJECT.DATASET.nyc | |
LIMIT | |
10000) | |
SELECT | |
COUNT(a.vendor_id), | |
b.geo_id | |
FROM | |
bigquery-public-data.geo_census_blockgroups.us_blockgroups_national b | |
JOIN | |
nyc a | |
ON | |
st_intersects(a.geom, | |
b.blockgroup_geom) | |
GROUP BY | |
b.geo_id | |
ORDER BY | |
COUNT(a.vendor_id) DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment