Skip to content

Instantly share code, notes, and snippets.

@dannguyen
Created July 26, 2022 16:00
Embed
What would you like to do?
Example of querying BigQuery's public dataset of SFPD crime incidents
SELECT
unique_key
, pddistrict AS pd_district
, DATE(timestamp) AS incident_date
, category
, descript AS description
, dayofweek AS day_of_week
, resolution
, UPPER(address) AS address
, longitude
, latitude
, timestamp AS incident_timestamp
, pdid AS pd_id
FROM
`bigquery-public-data.san_francisco.sfpd_incidents`
ORDER BY
incident_timestamp DESC
LIMIT
1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment