TPC-Havoc Q11_v5
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
WITH german_suppliers AS ( SELECT s_suppkey FROM supplier, nation WHERE s_nationkey = n_nationkey AND n_name = 'GERMANY'), inventory_values AS ( SELECT ps_partkey, ps_supplycost * ps_availqty AS part_value FROM partsupp, german_suppliers WHERE ps_suppkey = s_suppkey), total_threshold AS ( SELECT SUM(part_value) * 0.0100000000 AS threshold FROM inventory_values), part_totals AS ( SELECT ps_partkey, SUM(part_value) AS value FROM inventory_values GROUP BY ps_partkey)SELECT pt.ps_partkey, pt.valueFROM part_totals AS pt, total_threshold AS ttWHERE pt.value > tt.thresholdORDER BY pt.value 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['11_v5'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q11.py