Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select count(1)
- from
- (
- select op.name, count(op.name) as "name", op.lm_date as "lm_date"
- from oc_poi_load_data opl,
- oc_poi op,
- wbs w
- where upper(opl.poi_name) = upper(op.name)
- and op.poi_id = w.poi_id
- and opl.to_date > to_date ('01-01-2017', 'DD-MM-YYYY' )
- AND opl.to_date < sysdate
- and op.oc_poi_status_id = 1
- and op.oc_poi_category_id = 101433
- group by op.name, op.lm_date
- having count(op.name) > 1
- order by 2 desc
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement