TPC-Havoc Q8_v6
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT o_year, market_shareFROM ( SELECT o_year, SUM(CASE WHEN nation = 'BRAZIL' THEN volume ELSE 0 END) / SUM(volume) AS market_share FROM ( SELECT market_info.o_year, market_info.volume, market_info.nation FROM ( SELECT EXTRACT(YEAR FROM o_orderdate) AS o_year, l_extendedprice * ( 1 - l_discount ) AS volume, n2.n_name AS nation FROM part, supplier, lineitem, orders, customer, nation AS n1, nation AS n2, region WHERE p_partkey = l_partkey AND s_suppkey = l_suppkey AND l_orderkey = o_orderkey AND o_custkey = c_custkey AND c_nationkey = n1.n_nationkey AND n1.n_regionkey = r_regionkey AND r_name = 'AMERICA' AND s_nationkey = n2.n_nationkey AND o_orderdate BETWEEN CAST('1995-01-01' AS DATE) AND CAST('1996-12-31' AS DATE) AND p_type = 'ECONOMY ANODIZED STEEL' ) AS market_info ) AS market_details GROUP BY o_year) AS market_summaryORDER BY o_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['8_v6'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q08.py