Created
July 26, 2022 16:00
-
-
Save dannguyen/d34f9f2588e010a8f9e84fe03bdf0f01 to your computer and use it in GitHub Desktop.
Example of querying BigQuery's public dataset of SFPD crime incidents
This file contains hidden or 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 | |
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