NYC Taxi — Top Routes
NYC Taxi benchmark · all NYC Taxi queries
Most popular pickup-dropoff pairs
Representative SQL
Rendered for DataFusion with default parameters.
SELECT t.pickup_location_id, pz.zone AS pickup_zone, t.dropoff_location_id, dz.zone AS dropoff_zone, COUNT(*) AS trip_count, AVG(t.trip_distance) AS avg_distance, AVG(t.total_amount) AS avg_fareFROM trips AS tLEFT JOIN taxi_zones AS pz ON t.pickup_location_id = pz.location_idLEFT JOIN taxi_zones AS dz ON t.dropoff_location_id = dz.location_idWHERE t.pickup_datetime >= '2019-11-27' AND t.pickup_datetime < '2019-12-27'GROUP BY t.pickup_location_id, pz.zone, t.dropoff_location_id, dz.zoneORDER BY trip_count DESC NULLS LASTLIMIT 50Representative DataFrame
No DataFrame implementation is registered for this query.
Get the exact query for your run
The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:
from benchbox import NYCTaxi
bench = NYCTaxi(scale_factor=1.0) # your scale factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['top-routes'])Source
Query text: benchbox/core/nyctaxi/queries.py