Skip to content

TPC-DS-OBT Q26

TPC-DS-OBT benchmark · all TPC-DS-OBT queries

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
item_i_item_id,
AVG(quantity) AS agg1,
AVG(list_price) AS agg2,
AVG(coupon_amt) AS agg3,
AVG(sales_price) AS agg4
FROM tpcds_sales_returns_obt AS obt
WHERE
(
sold_date_sk = sold_date_d_date_sk
AND item_sk = item_i_item_sk
AND bill_cdemo_sk = bill_cdemo_cd_demo_sk
AND promo_sk = promo_p_promo_sk
AND bill_cdemo_cd_gender = '0'
AND bill_cdemo_cd_marital_status = '0'
AND bill_cdemo_cd_education_status = '0'
AND (
promo_p_channel_email = 'N' OR promo_p_channel_event = 'N'
)
AND sold_date_d_year = 1998
)
AND channel = 'catalog'
GROUP BY
item_i_item_id
ORDER BY
item_i_item_id
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 TPCDSOBT
bench = TPCDSOBT(scale_factor=1.0) # your scale factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['26'])

Source

Query text: benchbox/core/tpcds_obt/queries.py