Skip to content

NYC Taxi — Vendor Comparison

NYC Taxi benchmark · all NYC Taxi queries

Compare vendors by various metrics

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
vendor_id,
COUNT(*) AS trip_count,
AVG(trip_distance) AS avg_distance,
AVG(total_amount) AS avg_fare,
AVG(tip_amount) AS avg_tip,
SUM(total_amount) AS total_revenue
FROM trips
WHERE
pickup_datetime >= '2019-05-31' AND pickup_datetime < '2019-06-30'
GROUP BY
vendor_id
ORDER BY
trip_count DESC NULLS LAST

Representative 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 factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['vendor-comparison'])

Source

Query text: benchbox/core/nyctaxi/queries.py