TPC-DS-OBT Q94
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT COUNT(DISTINCT sale_id) AS "order count", SUM(ext_ship_cost) AS "total shipping cost", SUM(net_profit) AS "total net profit"FROM tpcds_sales_returns_obt AS obtWHERE ( ship_date_d_date BETWEEN '1999-2-01' AND ( CAST('1999-2-01' AS DATE) + INTERVAL '60 DAY' ) AND obt.ship_date_sk = ship_date_d_date_sk AND obt.ship_addr_sk = ship_addr_ca_address_sk AND ship_addr_ca_state = '0' AND obt.web_site_sk = web_site_web_site_sk AND web_site_web_company_name = 'pri' AND EXISTS( SELECT * FROM tpcds_sales_returns_obt AS obt WHERE ( obt.sale_id = obt.sale_id AND obt.warehouse_sk <> obt.warehouse_sk ) AND channel = 'web' ) AND NOT EXISTS( SELECT * FROM tpcds_sales_returns_obt AS obt WHERE obt.sale_id = obt.sale_id AND obt.has_return = 'Y' AND obt.channel = 'web' ) ) AND channel = 'web'ORDER BY COUNT(DISTINCT sale_id)LIMIT 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['94'])Source
Query text: benchbox/core/tpcds_obt/queries.py