Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. select count(1)
  2. from
  3. (
  4. select op.name, count(op.name) as "name", op.lm_date as "lm_date"
  5. from oc_poi_load_data opl,
  6. oc_poi op,
  7. wbs w
  8. where upper(opl.poi_name) = upper(op.name)
  9. and op.poi_id = w.poi_id
  10. and opl.to_date > to_date ('01-01-2017', 'DD-MM-YYYY' )
  11. AND opl.to_date < sysdate
  12. and op.oc_poi_status_id = 1
  13. and op.oc_poi_category_id = 101433
  14. group by op.name, op.lm_date
  15. having count(op.name) > 1
  16. order by 2 desc
  17. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement