Advertisement
psi_mmobile

Untitled

Nov 21st, 2022
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. select gv.gui_user_id, count(gv.vehicle_id) vehicle_count from gu_vehicle gv, vehicle v, vo_vehicle_category vovc
  2. where gv.vehicle_id = v.vehicle_id
  3. and v.vo_vehicle_category_id = vovc.vo_vehicle_category_id
  4. and nvl(vovc.is_active,'Y') = 'Y'
  5. and vovc.is_object = 'N'
  6. and nvl(v.vehicle_status_id,0) = 0
  7. group by gv.gui_user_id
  8. having count(gv.vehicle_id) > 25
  9. order by 2 desc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement