TPC-Havoc Q7_v6
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT supp_nation, cust_nation, l_year, total_volumeFROM ( SELECT supp_nation, cust_nation, l_year, SUM(volume) AS total_volume FROM ( SELECT shipping_info.supp_nation, shipping_info.cust_nation, shipping_info.l_year, shipping_info.volume FROM ( SELECT n1.n_name AS supp_nation, n2.n_name AS cust_nation, EXTRACT(YEAR FROM l_shipdate) AS l_year, l_extendedprice * ( 1 - l_discount ) AS volume FROM supplier, lineitem, orders, customer, nation AS n1, nation AS n2 WHERE s_suppkey = l_suppkey AND o_orderkey = l_orderkey AND c_custkey = o_custkey AND s_nationkey = n1.n_nationkey AND c_nationkey = n2.n_nationkey AND ( ( n1.n_name = 'FRANCE' AND n2.n_name = 'GERMANY' ) OR ( n1.n_name = 'GERMANY' AND n2.n_name = 'FRANCE' ) ) AND l_shipdate BETWEEN CAST('1995-01-01' AS DATE) AND CAST('1996-12-31' AS DATE) ) AS shipping_info ) AS shipping_details GROUP BY supp_nation, cust_nation, l_year) AS shipping_summaryORDER BY supp_nation, cust_nation, l_yearRepresentative 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['7_v6'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q07.py