Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select fu.remote_unit_id, count(et.event_Type_id)
- from gui_users gu, operation_center oc, vehicle_data vd1, remote_unit ru, fixed_unit fu,
- event_type et, oc_event_type ocet, str, person_data pd, person
- where gu.operation_center_id = oc.operation_center_id
- --and vd1.vehicle_id is null
- and vd1.remote_unit_id = ru.remote_unit_id
- and fu.remote_unit_id = ru.remote_unit_id
- and vd1.event_type_id = et.event_type_id
- and ocet.operation_center_id = oc.operation_center_id
- and ocet.event_type_id = et.event_type_id
- and ocet.str_id = str.str_id
- and gu.language = str.language
- and vd1.vehicle_data_id = pd.vehicle_data_id(+)
- and pd.person_id = person.person_id(+)
- AND touserdate(vd1.gps_full_date,oc.timezone) >= sysdate - 30
- AND touserdate(vd1.gps_full_date,oc.timezone) <= sysdate
- and gu.gui_user_id=101001
- and et.event_type_id = 119
- group by fu.remote_unit_id
- order by 2 desc;
- select * from remote_unit
- where remote_unit_id =170186;
- select * from fixed_unit
- where remote_unit_id = 170186;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement