Skip to content

Instantly share code, notes, and snippets.

@mbforr
Last active January 8, 2023 10:31
Embed
What would you like to do?
SELECT
COUNT(a.vendor_id),
b.geo_id
FROM
PROJECT.DATASET.nyc a
JOIN
bigquery-public-data.geo_census_blockgroups.us_blockgroups_national b
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