NYC Taxi — Distance Distribution
NYC Taxi benchmark · all NYC Taxi queries
Distribution of trip distances
Representative SQL
Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).
SELECT FLOOR(trip_distance) AS distance_miles, COUNT(*) AS trip_count, AVG(total_amount) AS avg_fareFROM tripsWHERE pickup_datetime >= '2019-09-30' AND pickup_datetime < '2019-10-30' AND trip_distance BETWEEN 0 AND 30GROUP BY FLOOR(trip_distance)ORDER BY distance_milesRepresentative 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['distance-distribution'])Source
Query text: benchbox/core/nyctaxi/queries.py