Skip to content

Instantly share code, notes, and snippets.

@bamnet
Created May 14, 2024 23:24
Show Gist options
  • Save bamnet/1b2c8163a0b1cbb4507e5715fd7d3b5a to your computer and use it in GitHub Desktop.
Save bamnet/1b2c8163a0b1cbb4507e5715fd7d3b5a to your computer and use it in GitHub Desktop.
SELECT names.primary, confidence, categories.main
FROM `bigquery-public-data.overture_maps.place` places
INNER JOIN (
SELECT geometry FROM `bigquery-public-data.overture_maps.division_area` WHERE names.primary = 'San Francisco'
) as city_bounds ON ST_CONTAINS(city_bounds.geometry, places.geometry)
ORDER BY confidence DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment