The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT NVL(SUM(wrkfc.headcount_end), 0)
FROM hri_mds_wrkfc_mgrh_c01_ct wrkfc
WHERE wrkfc.sup_person_fk = p_sup_person_id
AND wrkfc.time_month_snp_fk = to_number(to_char(p_effective_date, 'YYYYQMM'))
AND wrkfc.ptyp_wrktyp_fk = p_worker_type
AND wrkfc.sup_directs_only_flag = p_directs_only;
SELECT NVL(SUM(wrkfc.fte_end), 0)
FROM hri_mds_wrkfc_mgrh_c01_ct wrkfc
WHERE wrkfc.sup_person_fk = p_sup_person_id
AND wrkfc.time_month_snp_fk = to_char(p_effective_date, 'YYYYQMM')
AND wrkfc.ptyp_wrktyp_fk = p_worker_type
AND wrkfc.sup_directs_only_flag = p_directs_only;
SELECT NVL(SUM(wrkfc.count_pasg_end), 0)
FROM hri_mds_wrkfc_mgrh_c01_ct wrkfc
WHERE wrkfc.sup_person_fk = p_sup_person_id
AND wrkfc.time_month_snp_fk = to_char(p_effective_date, 'YYYYQMM')
AND wrkfc.ptyp_wrktyp_fk = p_worker_type
AND wrkfc.sup_directs_only_flag = p_directs_only;
SELECT NVL(SUM(wrkfc.count_asg_end), 0)
FROM hri_mds_wrkfc_mgrh_c01_ct wrkfc
WHERE wrkfc.sup_person_fk = p_sup_person_id
AND wrkfc.time_month_snp_fk = to_char(p_effective_date, 'YYYYQMM')
AND wrkfc.ptyp_wrktyp_fk = p_worker_type
AND wrkfc.sup_directs_only_flag = p_directs_only;
SELECT
NVL(SUM(wevt.headcount * trn.transfer_in_ind), 0) hdc_trn_in
,NVL(SUM(wevt.headcount * trn.transfer_out_ind), 0) hdc_trn_out
,NVL(SUM(wevt.fte * trn.transfer_in_ind), 0) fte_trn_in
,NVL(SUM(wevt.fte * trn.transfer_out_ind), 0) fte_trn_out
,NVL(SUM(wevt.primary_ind * trn.transfer_in_ind), 0) pasg_cnt_trn_in
,NVL(SUM(wevt.primary_ind * trn.transfer_out_ind), 0) pasg_cnt_trn_out
,NVL(SUM(trn.transfer_in_ind), 0) asg_cnt_trn_in
,NVL(SUM(trn.transfer_out_ind), 0) asg_cnt_trn_out
FROM
hri_mdp_mgrh_transfers_ct trn
,hri_mb_wrkfc_evt_ct wevt
WHERE trn.mgr_sup_person_fk = p_sup_person_id
AND trn.ptyp_wrktyp_fk = p_worker_type
AND trn.asg_assgnmnt_fk = wevt.asg_assgnmnt_fk
AND trn.time_day_evt_fk BETWEEN wevt.time_day_evt_fk
AND wevt.time_day_evt_end_fk
AND trn.direct_record_ind = v_direct_record_ind
AND trn.time_day_evt_fk BETWEEN p_from_date
AND p_to_date;