TPC-DS-OBT Q41
TPC-DS-OBT benchmark · all TPC-DS-OBT queries
Representative SQL
Rendered for DataFusion with default parameters.
SELECT DISTINCT ( item_i_product_name )FROM tpcds_sales_returns_obt AS obtWHERE item_i_manufact_id BETWEEN 667 AND 667 + 40 AND ( SELECT COUNT(*) AS item_cnt FROM tpcds_sales_returns_obt AS obt WHERE ( obt.item_i_manufact = obt.item_i_manufact AND ( ( obt.item_i_category = 'Women' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Women' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Men' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Men' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) ) ) OR ( obt.item_i_manufact = obt.item_i_manufact AND ( ( obt.item_i_category = 'Women' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Women' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Men' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) OR ( obt.item_i_category = 'Men' AND ( obt.item_i_color = '1' OR obt.item_i_color = '1' ) AND ( obt.item_i_units = '1' OR obt.item_i_units = '1' ) AND ( obt.item_i_size = '1' OR obt.item_i_size = '1' ) ) ) ) ) > 0ORDER BY item_i_product_nameLIMIT 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['41'])Source
Query text: benchbox/core/tpcds_obt/queries.py