TPC-DS-OBT Q27
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT obt.item_i_item_id, obt.store_s_state, GROUPING(obt.store_s_state) AS g_state, AVG(obt.quantity) AS agg1, AVG(obt.list_price) AS agg2, AVG(obt.coupon_amt) AS agg3, AVG(obt.sales_price) AS agg4FROM tpcds_sales_returns_obt AS obtWHERE ( obt.sold_date_sk = obt.sold_date_d_date_sk AND obt.item_sk = obt.item_i_item_sk AND obt.store_sk = obt.store_s_store_sk AND obt.ship_cdemo_sk = obt.bill_cdemo_cd_demo_sk AND obt.bill_cdemo_cd_gender = 'F' AND obt.bill_cdemo_cd_marital_status = 'W' AND obt.bill_cdemo_cd_education_status = 'Primary' AND obt.sold_date_d_year = 1998 AND obt.store_s_state IN ('TN', 'TN', 'TN', 'TN', 'TN', 'TN') ) AND channel = 'store'GROUP BY ROLLUP ( obt.item_i_item_id, obt.store_s_state )ORDER BY obt.item_i_item_id, obt.store_s_stateLIMIT 100Representative 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 factorqueries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQLprint(queries['27'])Source
Query text: benchbox/core/tpcds_obt/queries.py