TPC-Havoc Q15_v5
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
WITH revenue_calculation AS ( SELECT l_suppkey AS supplier_no, SUM(l_extendedprice * ( 1 - l_discount )) AS total_revenue FROM lineitem WHERE l_shipdate >= CAST('1996-01-01' AS DATE) AND l_shipdate < CAST('1996-01-01' AS DATE) + INTERVAL '3 MONTH' GROUP BY l_suppkey), max_revenue AS ( SELECT MAX(total_revenue) AS max_total_revenue FROM revenue_calculation), top_suppliers AS ( SELECT rc.supplier_no, rc.total_revenue FROM revenue_calculation AS rc CROSS JOIN max_revenue AS mr WHERE rc.total_revenue = mr.max_total_revenue)SELECT s.s_suppkey, s.s_name, s.s_address, s.s_phone, ts.total_revenueFROM supplier AS sINNER JOIN top_suppliers AS ts ON s.s_suppkey = ts.supplier_noORDER BY s.s_suppkeyRepresentative 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['15_v5'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q15.py