TPC-DS-OBT Q19
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT item_i_brand_id AS brand_id, item_i_brand AS brand, item_i_manufact_id, item_i_manufact, SUM(ext_sales_price) AS ext_priceFROM tpcds_sales_returns_obt AS obtWHERE ( sold_date_d_date_sk = sold_date_sk AND item_sk = item_i_item_sk AND item_i_manager_id = 2 AND sold_date_d_moy = 11 AND sold_date_d_year = 1998 AND ship_customer_sk = bill_customer_c_customer_sk AND bill_customer_c_current_addr_sk = bill_addr_ca_address_sk AND SUBSTRING(bill_addr_ca_zip FROM 1 FOR 5) <> SUBSTRING(store_s_zip FROM 1 FOR 5) AND store_sk = store_s_store_sk ) AND channel = 'store'GROUP BY item_i_brand, item_i_brand_id, item_i_manufact_id, item_i_manufactORDER BY ext_price DESC, item_i_brand, item_i_brand_id, item_i_manufact_id, item_i_manufactLIMIT 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['19'])Source
Query text: benchbox/core/tpcds_obt/queries.py