TPC-Havoc Q9_v7
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT nation, o_year, SUM(l_extendedprice * ( 1 - l_discount ) - ps_supplycost * l_quantity) FILTER(WHERE p_name LIKE '%green%') AS sum_profitFROM ( SELECT n_name AS nation, EXTRACT(YEAR FROM o_orderdate) AS o_year, l_extendedprice, l_discount, ps_supplycost, l_quantity, p_name FROM part, supplier, lineitem, partsupp, orders, nation WHERE s_suppkey = l_suppkey AND ps_suppkey = l_suppkey AND ps_partkey = l_partkey AND p_partkey = l_partkey AND o_orderkey = l_orderkey AND s_nationkey = n_nationkey) AS profitGROUP BY nation, o_yearHAVING sum_profit IS NOT NULLORDER BY nation, o_year DESCRepresentative 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['9_v7'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q09.py