TPC-DI A4
TPC-DI benchmark · all TPC-DI queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT d.CalendarYearID, d.CalendarQtrID, COUNT(t.TradeID) AS trade_count, SUM(t.Quantity * t.TradePrice) AS total_value, AVG(t.TradePrice) AS avg_price, SUM(t.Fee + t.Commission + t.Tax) AS total_feesFROM DimDate AS dJOIN FactTrade AS t ON d.SK_DateID = t.SK_CreateDateIDWHERE d.CalendarYearID >= 2015 AND d.CalendarYearID <= 2019GROUP BY d.CalendarYearID, d.CalendarQtrIDORDER BY d.CalendarYearID, d.CalendarQtrIDRepresentative 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 TPCDI
bench = TPCDI(scale_factor=0.01) # your scale factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['A4'])Source
Query text: benchbox/core/tpcdi/queries.py