TPC-DS-OBT Q25
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT s.item_i_item_id AS i_item_id, s.item_i_item_desc AS i_item_desc, s.store_s_store_id AS s_store_id, s.store_s_store_name AS s_store_name, SUM(s.net_profit) AS store_sales_profit, SUM(s.return_net_loss) AS store_returns_loss, SUM(c.net_profit) AS catalog_sales_profitFROM tpcds_sales_returns_obt AS sJOIN tpcds_sales_returns_obt AS c ON c.bill_customer_sk = s.returning_customer_c_customer_sk AND c.item_sk = s.item_skWHERE s.channel = 'store' AND s.has_return = 'Y' AND c.channel = 'catalog' AND s.sold_date_d_moy = 4 AND s.sold_date_d_year = 2000 AND NOT s.item_i_item_sk IS NULL AND NOT s.store_s_store_sk IS NULL AND s.bill_customer_sk = s.returning_customer_c_customer_sk AND s.return_date_d_moy BETWEEN 4 AND 10 AND s.return_date_d_year = 2000 AND c.sold_date_d_moy BETWEEN 4 AND 10 AND c.sold_date_d_year = 2000GROUP BY s.item_i_item_id, s.item_i_item_desc, s.store_s_store_id, s.store_s_store_nameORDER BY s.item_i_item_id, s.item_i_item_desc, s.store_s_store_id, s.store_s_store_nameLIMIT 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['25'])Source
Query text: benchbox/core/tpcds_obt/queries.py