q82.sql 727 B

1234567891011121314151617181920
  1. --!syntax_pg
  2. --TPC-DS Q82
  3. -- start query 1 in stream 0 using template ../query_templates/query82.tpl
  4. select i_item_id
  5. ,i_item_desc
  6. ,i_current_price
  7. from plato.item, plato.inventory, plato.date_dim, plato.store_sales
  8. where i_current_price between 30::numeric and (30+30)::numeric
  9. and inv_item_sk = i_item_sk
  10. and d_date_sk=inv_date_sk
  11. and d_date between cast('2002-05-30' as date) and (cast('2002-05-30' as date) + interval '60' day)::date
  12. and i_manufact_id in (437,129,727,663)
  13. and inv_quantity_on_hand between 100 and 500
  14. and ss_item_sk = i_item_sk
  15. group by i_item_id,i_item_desc,i_current_price
  16. order by i_item_id
  17. limit 100;
  18. -- end query 1 in stream 0 using template ../query_templates/query82.tpl