SELECT ppf.employee_number,
ppf.full_name,
ppp.proposed_salary_n,
ppp.change_date
FROM per_pay_proposals ppp,
per_all_people_f ppf,
per_all_assignments_f paaf
WHERE ppf.person_id = paaf.person_id
AND paaf.assignment_id = ppp.assignment_id
AND TRUNC (SYSDATE) BETWEEN ppf.effective_start_date
AND ppf.effective_end_date
AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND ppp.approved = 'Y'
AND change_date =
(SELECT MIN (change_date)
FROM per_pay_proposals
WHERE assignment_id = ppp.assignment_id
AND proposed_salary_n = ppp.proposed_salary_n)
AND ppf.employee_number = '1234567890'
ORDER BY ppp.change_date DESC
No comments:
Post a Comment