Advertisement
psi_mmobile

Untitled

Nov 21st, 2022
1,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.50 KB | None | 0 0
  1. SELECT gu.loginname, gu.loginpwd FROM gui_users gu, (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) nv
  9. WHERE gu.gui_user_id = nv.gui_user_id
  10. AND LOWER(gu.loginpwd) NOT LIKE '%deleted%';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement