Query : Retrieve ex employees for last 3 months

select
from per_all_people_f papf,
per_periods_of_service ppos
where papf.person_id = ppos.person_id
and ppos.actual_termination_date BETWEEN ADD_MONTHS(sysdate,-3) AND sysdate
and ppos.actual_terminate_date BETWEEN papf.effective_start_date AND papf.effective_end_date

0 comments:

Post a Comment