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
Introduction to SQL for BigQuery and Cloud SQL | |
# Exploring the BigQuery Console | |
SELECT end_station_name FROM `bigquery-public-data.london_bicycles.cycle_hire`; | |
SELECT * FROM `bigquery-public-data.london_bicycles.cycle_hire` WHERE duration>=1200; | |
SELECT start_station_name FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; | |
# More SQL Keywords: GROUP BY, COUNT, AS, and ORDER BY | |
SELECT start_station_name, COUNT(*) FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; | |
SELECT start_station_name, COUNT(*) AS num_starts FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; |
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
#!/usr/bin/env python3 | |
import csv | |
import datetime | |
import requests | |
FILE_URL = "https://storage.googleapis.com/gwg-hol-assets/gic215/employees-with-date.csv" |