TPC-Havoc Q17_v4
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT SUM(revenue) / 7.0 AS avg_yearlyFROM ( SELECT l_extendedprice AS revenue FROM lineitem, part WHERE p_partkey = l_partkey AND p_brand = 'Brand#23' AND p_container = 'MED BOX' AND l_quantity < ( SELECT 0.2 * AVG(l_quantity) FROM lineitem WHERE l_partkey = p_partkey ) UNION ALL SELECT 0 AS revenue FROM ( SELECT 1 ) AS dual WHERE FALSE) AS combinedRepresentative 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_v4'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q17.py