TPC-DS-OBT Q45
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT bill_cur_addr_ca_zip AS ca_zip, bill_cur_addr_ca_county, SUM(sales_price)FROM tpcds_sales_returns_obtWHERE channel = 'web' AND NOT bill_cur_addr_ca_address_sk IS NULL AND NOT item_i_item_sk IS NULL AND ( SUBSTRING(bill_cur_addr_ca_zip FROM 1 FOR 5) IN ('85669', '86197', '88274', '83405', '86475', '85392', '85460', '80348', '81792') OR item_i_item_id IN ( SELECT DISTINCT item_i_item_id FROM tpcds_sales_returns_obt WHERE item_i_item_sk IN (2, 3, 5, 7, 11, 13, 17, 19, 23, 29) ) ) AND sold_date_d_qoy = 2 AND sold_date_d_year = 2000GROUP BY bill_cur_addr_ca_zip, bill_cur_addr_ca_countyORDER BY ca_zip, bill_cur_addr_ca_countyLIMIT 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['45'])Source
Query text: benchbox/core/tpcds_obt/queries.py