Last active
August 12, 2019 21:47
-
-
Save sararob/d9ed1fcb61112aa6e0f5e6727408c51e to your computer and use it in GitHub Desktop.
The life of Citibike # 17526
This file contains 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
# Enable Standard SQL to run this query | |
# More on BigQuery here: https://cloud.google.com/bigquery/docs/quickstarts | |
SELECT | |
REGEXP_REPLACE(starttime, '([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})', '\\3-\\1-\\2') as starttime, | |
from_station_lat, | |
from_station_lng | |
FROM `sara-bigquery.nyc_citibike.trips_*` | |
WHERE cast(bikeid as int64) = 17526 # This is the bike with the most trips (found from another query) | |
order by starttime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment