TPC-Havoc Q3_v9
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT DISTINCT l_orderkey, SUM(l_extendedprice * ( 1 - l_discount )) OVER (PARTITION BY l_orderkey) AS revenue, FIRST_VALUE(o_orderdate) OVER (PARTITION BY l_orderkey ORDER BY l_orderkey) AS o_orderdate, FIRST_VALUE(o_shippriority) OVER (PARTITION BY l_orderkey ORDER BY l_orderkey) AS o_shippriorityFROM customer, orders, lineitemWHERE c_mktsegment = 'BUILDING' AND c_custkey = o_custkey AND l_orderkey = o_orderkey AND o_orderdate < CAST('1995-03-15' AS DATE) AND l_shipdate > CAST('1995-03-15' AS DATE)ORDER BY revenue DESC, o_orderdateRepresentative 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['3_v9'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q03.py