TPC-Havoc Q2_v7
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
WITH cost_analysis AS ( SELECT p_partkey, s_suppkey, s_acctbal, s_name, n_name, p_mfgr, s_address, s_phone, s_comment, ps_supplycost, MIN(ps_supplycost) FILTER(WHERE r_name = 'EUROPE') OVER (PARTITION BY p_partkey) AS min_cost FROM part, supplier, partsupp, nation, region WHERE p_partkey = ps_partkey AND s_suppkey = ps_suppkey AND p_size = 15 AND p_type LIKE '%BRASS' AND s_nationkey = n_nationkey AND n_regionkey = r_regionkey AND r_name = 'EUROPE')SELECT s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_commentFROM cost_analysisWHERE ps_supplycost = min_costORDER BY s_acctbal DESC, n_name, s_name, p_partkeyRepresentative 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['2_v7'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q02.py