Skip to content

TPC-Havoc Q6_v4

TPC-Havoc benchmark · all TPC-Havoc queries

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
SUM(revenue) AS revenue
FROM (
SELECT
SUM(l_extendedprice * l_discount) AS revenue
FROM lineitem
WHERE
l_shipdate >= CAST('1994-01-01' AS DATE)
AND l_shipdate < CAST('1994-07-01' AS DATE)
AND l_discount BETWEEN 0.06 - 0.01 AND 0.06 + 0.01
AND l_quantity < 24
UNION ALL
SELECT
SUM(l_extendedprice * l_discount) AS revenue
FROM lineitem
WHERE
l_shipdate >= CAST('1994-07-01' AS DATE)
AND l_shipdate < CAST('1994-01-01' AS DATE) + INTERVAL '1 YEAR'
AND l_discount BETWEEN 0.06 - 0.01 AND 0.06 + 0.01
AND l_quantity < 24
) AS combined

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['6_v4'])

Source

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