Skip to content

Instantly share code, notes, and snippets.

@thrasibule
Created March 12, 2017 22:29
Show Gist options
  • Save thrasibule/0afa3986fc1c6e28e54fa2e3124b8b87 to your computer and use it in GitHub Desktop.
Save thrasibule/0afa3986fc1c6e28e54fa2e3124b8b87 to your computer and use it in GitHub Desktop.
library(bigrquery)
projectid <- "test-project-160619"
query <- "SELECT
TIMESTAMP_TRUNC(pickup_datetime,
MONTH) month,
COUNT(*) trips
FROM
`bigquery-public-data.new_york.tlc_yellow_trips_2015`
GROUP BY
1
ORDER BY
1"
df <- query_exec(query, projectid, useLegacySql = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment