TPC-Havoc Q15_v7
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
WITH revenue_with_filter AS ( SELECT l_suppkey AS supplier_no, SUM(l_extendedprice * ( 1 - l_discount )) FILTER(WHERE l_shipdate >= CAST('1996-01-01' AS DATE) AND l_shipdate < CAST('1996-01-01' AS DATE) + INTERVAL '3 MONTH') 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)SELECT s.s_suppkey, s.s_name, s.s_address, s.s_phone, r.total_revenueFROM supplier AS s, revenue_with_filter AS rWHERE s.s_suppkey = r.supplier_no AND r.total_revenue = ( SELECT MAX(total_revenue) FROM revenue_with_filter )ORDER 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_v7'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q15.py