Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select gv.gui_user_id, count(gv.vehicle_id) vehicle_count from gu_vehicle gv, vehicle v, vo_vehicle_category vovc
- where gv.vehicle_id = v.vehicle_id
- and v.vo_vehicle_category_id = vovc.vo_vehicle_category_id
- and nvl(vovc.is_active,'Y') = 'Y'
- and vovc.is_object = 'N'
- and nvl(v.vehicle_status_id,0) = 0
- group by gv.gui_user_id
- having count(gv.vehicle_id) > 25
- order by 2 desc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement