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