TPC-Havoc Q17_v9
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
WITH lineitem_with_avg AS ( SELECT l_extendedprice, l_quantity, l_partkey, 0.2 * AVG(l_quantity) OVER (PARTITION BY l_partkey) AS avg_threshold FROM lineitem)SELECT SUM(lwa.l_extendedprice) / 7.0 AS avg_yearlyFROM lineitem_with_avg AS lwa, part AS pWHERE p.p_partkey = lwa.l_partkey AND p.p_brand = 'Brand#23' AND p.p_container = 'MED BOX' AND lwa.l_quantity < lwa.avg_thresholdRepresentative 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 TPCHavoc
bench = TPCHavoc(scale_factor=0.01) # your scale factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['17_v9'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q17.py