Skip to content

TPC-Havoc Q18_v5

TPC-Havoc benchmark · all TPC-Havoc queries

Representative SQL

Rendered for DataFusion with default parameters.

WITH large_orders AS (
SELECT
l_orderkey
FROM lineitem
GROUP BY
l_orderkey
HAVING
SUM(l_quantity) > 300
)
SELECT
c.c_name,
c.c_custkey,
o.o_orderkey,
o.o_orderdate,
o.o_totalprice,
SUM(l.l_quantity)
FROM customer AS c, orders AS o, lineitem AS l, large_orders AS lo
WHERE
c.c_custkey = o.o_custkey
AND o.o_orderkey = l.l_orderkey
AND o.o_orderkey = lo.l_orderkey
GROUP BY
c.c_name,
c.c_custkey,
o.o_orderkey,
o.o_orderdate,
o.o_totalprice
ORDER BY
o.o_totalprice DESC,
o.o_orderdate
LIMIT 100

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['18_v5'])

Source

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