Created
December 15, 2014 20:43
-
-
Save thorwebdev/424494f824475e30216c to your computer and use it in GitHub Desktop.
These are some interesting queries you can run on this BigQuery table: https://bigquery.cloud.google.com/table/nyctaximap:dataflow.nyc_output_join_fare_distinct . The data has been aggregated using Google Cloud Dataflow. For more background information on how the data has been processed see: https://googlecloudplatform.blogspot.com
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 | |
pickup_polyId, | |
SUM(fare_amount)/COUNT(*) AS average_fare, | |
COUNT(*) AS no_of_trips | |
FROM | |
[nyctaximap:dataflow.nyc_output_join_fare_distinct] | |
WHERE | |
fare_amount!=0 | |
GROUP BY | |
pickup_polyId | |
HAVING | |
no_of_trips > 100000 | |
ORDER BY | |
average_fare DESC; |
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 | |
pickup_polyId, | |
SUM(tip_amount)/COUNT(*) AS average_tip, | |
COUNT(*) AS no_of_trips | |
FROM | |
[nyctaximap:dataflow.nyc_output_join_fare_distinct] | |
WHERE | |
tip_amount!=0 | |
GROUP BY | |
pickup_polyId | |
HAVING | |
no_of_trips > 50000 | |
ORDER BY | |
average_tip DESC; |
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 | |
pickup_polyId, | |
COUNT(*) AS no_of_trips | |
FROM | |
[nyctaximap:dataflow.nyc_output_join_fare_distinct] | |
GROUP BY | |
pickup_polyId | |
ORDER BY | |
no_of_trips DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment