NYC Taxi — Weekday vs Weekend
NYC Taxi benchmark · all NYC Taxi queries
Compare weekday and weekend patterns
Representative SQL
Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).
SELECT CASE WHEN EXTRACT(DOW FROM pickup_datetime) IN (0, 6) THEN 'weekend' ELSE 'weekday' END AS day_type, EXTRACT(HOUR FROM pickup_datetime) AS hour, COUNT(*) AS trip_count, AVG(trip_distance) AS avg_distance, AVG(total_amount) AS avg_fareFROM tripsWHERE pickup_datetime >= '2019-06-30' AND pickup_datetime < '2019-07-30'GROUP BY CASE WHEN EXTRACT(DOW FROM pickup_datetime) IN (0, 6) THEN 'weekend' ELSE 'weekday' END, EXTRACT(HOUR FROM pickup_datetime)ORDER BY day_type, hourRepresentative 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['weekday-weekend-comparison'])Source
Query text: benchbox/core/nyctaxi/queries.py