Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT gu.gui_user_id, ptd.date_day AS WORK_DATE, SUM(ptd.work_duration) AS WORKED_HOURS
- FROM gui_users gu, gu_person gp, person p, vo_person_category vopc, pd_day ptd
- WHERE gu.gui_user_id = gp.gui_user_id
- AND gp.person_id = p.person_id
- AND p.person_id = ptd.person_id
- AND p.vo_person_category_id = vopc.vo_person_category_id
- AND p.person_status_id = 0
- AND NVL(vopc.is_active,'Y') = 'Y'
- AND gu.user_admin_right != 'MF'
- AND ptd.work_duration IS NOT NULL
- AND ptd.date_day BETWEEN TRUNC(SYSDATE,'iw') AND TRUNC(SYSDATE,'iw') + 6
- AND ptd.date_day > SYSDATE - 8
- GROUP BY gu.gui_user_id,ptd.date_day;
- SELECT gu.gui_user_id, ptd.date_day AS WORK_DATE, SUM(ptd.TRF_DHR) AS WORKED_HOURS
- FROM gui_users gu, gu_person gp, person p, vo_person_category vopc, pd_trf_day ptd
- WHERE gu.gui_user_id = gp.gui_user_id
- AND gp.person_id = p.person_id
- AND p.person_id = ptd.person_id
- AND p.vo_person_category_id = vopc.vo_person_category_id
- AND p.person_status_id = 0
- AND NVL(vopc.is_active,'Y') = 'Y'
- AND gu.user_admin_right != 'MF'
- AND ptd.trf_dhr IS NOT NULL
- AND ptd.date_day BETWEEN TRUNC(SYSDATE,'iw') AND TRUNC(SYSDATE,'iw') + 6
- AND ptd.date_day > SYSDATE - 8
- GROUP BY gu.gui_user_id,ptd.date_day;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement