TPC-Havoc Q1_v3
TPC-Havoc benchmark · all TPC-Havoc queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT l1.l_returnflag, l1.l_linestatus, SUM(l1.l_quantity) AS sum_qty, SUM(l1.l_extendedprice) AS sum_base_price, SUM(l1.l_extendedprice * ( 1 - l1.l_discount )) AS sum_disc_price, SUM(l1.l_extendedprice * ( 1 - l1.l_discount ) * ( 1 + l1.l_tax )) AS sum_charge, AVG(l1.l_quantity) AS avg_qty, AVG(l1.l_extendedprice) AS avg_price, AVG(l1.l_discount) AS avg_disc, COUNT(*) AS count_orderFROM lineitem AS l1INNER JOIN ( SELECT DISTINCT l_returnflag, l_linestatus FROM lineitem WHERE l_shipdate <= CAST('1998-12-01' AS DATE) - INTERVAL '90 DAY') AS l2 ON l1.l_returnflag = l2.l_returnflag AND l1.l_linestatus = l2.l_linestatusWHERE l1.l_shipdate <= CAST('1998-12-01' AS DATE) - INTERVAL '90 DAY'GROUP BY l1.l_returnflag, l1.l_linestatusORDER BY l1.l_returnflag, l1.l_linestatusRepresentative 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['1_v3'])Source
Query text: benchbox/core/tpchavoc/variant_sets/q01.py