Skip to content

TPC-DI A3

TPC-DI benchmark · all TPC-DI queries

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
s.Symbol,
s.Name,
COUNT(t.TradeID) AS trade_count,
SUM(t.Quantity) AS total_quantity,
AVG(t.TradePrice) AS avg_price,
MIN(t.TradePrice) AS min_price,
MAX(t.TradePrice) AS max_price,
SUM(t.Quantity * t.TradePrice) AS total_value
FROM DimSecurity AS s
JOIN FactTrade AS t
ON s.SK_SecurityID = t.SK_SecurityID
WHERE
s.IsCurrent IS TRUE AND t.Status = 'Completed'
GROUP BY
s.Symbol,
s.Name
HAVING
COUNT(t.TradeID) > 100
ORDER BY
total_value DESC
LIMIT 50

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

Source

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