TPC-DS-OBT Q68
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT c_last_name, c_first_name, ca_city, bought_city, ss_ticket_number, extended_price, extended_tax, list_priceFROM ( SELECT sale_id AS ss_ticket_number, bill_customer_c_customer_sk AS cust_sk, bill_addr_ca_city AS bought_city, bill_customer_c_last_name AS c_last_name, bill_customer_c_first_name AS c_first_name, bill_cur_addr_ca_city AS ca_city, SUM(ext_sales_price) AS extended_price, SUM(ext_list_price) AS list_price, SUM(ext_tax) AS extended_tax FROM tpcds_sales_returns_obt WHERE channel = 'store' AND NOT sold_date_d_date_sk IS NULL AND NOT store_s_store_sk IS NULL AND NOT bill_hdemo_hd_demo_sk IS NULL AND NOT bill_addr_ca_address_sk IS NULL AND sold_date_d_dom BETWEEN 1 AND 2 AND ( bill_hdemo_hd_dep_count = 5 OR bill_hdemo_hd_vehicle_count = 3 ) AND sold_date_d_year IN (1999, 1999 + 1, 1999 + 2) AND store_s_city IN ('Midway', 'Fairview') GROUP BY sale_id, bill_customer_sk, bill_addr_sk, bill_addr_ca_city, bill_customer_c_customer_sk, bill_customer_c_last_name, bill_customer_c_first_name, bill_cur_addr_ca_city) AS dnWHERE NOT cust_sk IS NULL AND ca_city <> bought_cityORDER BY c_last_name, ss_ticket_numberLIMIT 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['68'])Source
Query text: benchbox/core/tpcds_obt/queries.py