Skip to content

TPC-DS-OBT Q91

TPC-DS-OBT benchmark · all TPC-DS-OBT queries

Representative SQL

Rendered for DataFusion with default parameters.

SELECT
return_call_center_cc_call_center_id AS Call_Center,
return_call_center_cc_name AS Call_Center_Name,
return_call_center_cc_manager AS Manager,
SUM(return_net_loss) AS Returns_Loss
FROM tpcds_sales_returns_obt
WHERE
channel = 'catalog'
AND has_return = 'Y'
AND NOT return_call_center_cc_call_center_sk IS NULL
AND return_date_d_year = 1999
AND return_date_d_moy = 11
AND NOT returning_customer_c_customer_sk IS NULL
AND NOT returning_cur_cdemo_cd_demo_sk IS NULL
AND NOT returning_cur_hdemo_hd_demo_sk IS NULL
AND NOT returning_cur_addr_ca_address_sk IS NULL
AND (
(
returning_cur_cdemo_cd_marital_status = 'M'
AND returning_cur_cdemo_cd_education_status = 'Unknown'
)
OR (
returning_cur_cdemo_cd_marital_status = 'W'
AND returning_cur_cdemo_cd_education_status = 'Advanced Degree'
)
)
AND returning_cur_hdemo_hd_buy_potential LIKE '0-500%'
AND returning_cur_addr_ca_gmt_offset = -7
GROUP BY
return_call_center_cc_call_center_id,
return_call_center_cc_name,
return_call_center_cc_manager,
returning_cur_cdemo_cd_marital_status,
returning_cur_cdemo_cd_education_status
ORDER BY
SUM(return_net_loss) DESC

Representative 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 factor
queries = bench.get_queries(dialect="datafusion") # your platform's dialect; drop dialect= for native SQL
print(queries['91'])

Source

Query text: benchbox/core/tpcds_obt/queries.py