TPC-DI A2
TPC-DI benchmark · all TPC-DI queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT comp.Industry, comp.SPrating, COUNT(DISTINCT comp.SK_CompanyID) AS company_count, COUNT(t.TradeID) AS trade_count, AVG(t.TradePrice) AS avg_trade_price, SUM(t.Quantity * t.TradePrice) AS total_trade_valueFROM DimCompany AS compLEFT JOIN FactTrade AS t ON comp.SK_CompanyID = t.SK_CompanyIDWHERE comp.IsCurrent IS TRUEGROUP BY comp.Industry, comp.SPratingHAVING COUNT(t.TradeID) > 100ORDER BY total_trade_value DESCLIMIT 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 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['A2'])Source
Query text: benchbox/core/tpcdi/queries.py