psi_mmobile

Untitled

Jul 30th, 2021
736
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT gu.gui_user_id, ptd.date_day AS WORK_DATE, SUM(ptd.work_duration) AS WORKED_HOURS
  2. FROM gui_users gu, gu_person gp, person p, vo_person_category vopc, pd_day ptd
  3. WHERE gu.gui_user_id = gp.gui_user_id
  4. AND gp.person_id = p.person_id
  5. AND p.person_id = ptd.person_id
  6. AND p.vo_person_category_id = vopc.vo_person_category_id
  7. AND p.person_status_id = 0
  8. AND NVL(vopc.is_active,'Y') = 'Y'
  9. AND gu.user_admin_right != 'MF'
  10. AND ptd.work_duration IS NOT NULL
  11. AND ptd.date_day BETWEEN TRUNC(SYSDATE,'iw') AND TRUNC(SYSDATE,'iw') + 6
  12. AND ptd.date_day > SYSDATE - 8
  13. GROUP BY gu.gui_user_id,ptd.date_day;
  14.  
  15.  
  16. SELECT gu.gui_user_id, ptd.date_day AS WORK_DATE, SUM(ptd.TRF_DHR) AS WORKED_HOURS
  17. FROM gui_users gu, gu_person gp, person p, vo_person_category vopc, pd_trf_day ptd
  18. WHERE gu.gui_user_id = gp.gui_user_id
  19. AND gp.person_id = p.person_id
  20. AND p.person_id = ptd.person_id
  21. AND p.vo_person_category_id = vopc.vo_person_category_id
  22. AND p.person_status_id = 0
  23. AND NVL(vopc.is_active,'Y') = 'Y'
  24. AND gu.user_admin_right != 'MF'
  25. AND ptd.trf_dhr IS NOT NULL
  26. AND ptd.date_day BETWEEN TRUNC(SYSDATE,'iw') AND TRUNC(SYSDATE,'iw') + 6
  27. AND ptd.date_day > SYSDATE - 8
  28. GROUP BY gu.gui_user_id,ptd.date_day;
RAW Paste Data