Skip to content

TPC-Havoc Q16_v3

TPC-Havoc benchmark · all TPC-Havoc queries

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
p.p_brand,
p.p_type,
p.p_size,
COUNT(DISTINCT ps.ps_suppkey) AS supplier_cnt
FROM part AS p
INNER JOIN partsupp AS ps
ON p.p_partkey = ps.ps_partkey
LEFT JOIN (
SELECT
s_suppkey
FROM supplier
WHERE
s_comment LIKE '%Customer%Complaints%'
) AS excluded_suppliers
ON ps.ps_suppkey = excluded_suppliers.s_suppkey
WHERE
p.p_brand <> 'Brand#45'
AND p.p_type NOT LIKE 'MEDIUM POLISHED%'
AND p.p_size IN (49, 14, 23, 45, 19, 3, 36, 9)
AND excluded_suppliers.s_suppkey IS NULL
GROUP BY
p.p_brand,
p.p_type,
p.p_size
ORDER BY
supplier_cnt DESC,
p.p_brand,
p.p_type,
p.p_size

Representative 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 factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['16_v3'])

Source

Query text: benchbox/core/tpchavoc/variant_sets/q16.py