SELECT *
FROM (SELECTJ.EMPLID,J.EMPL_RCD,J.EFFDT,J.EFFSEQ,J.EMPL_STATUS,J.Action,J.ACTION_REASON,J.POSITION_NBR,J.REPORTS_TO,
Row_number() OVER(PARTITION BY J.EMPLID,J.EMPL_RCD ORDER BY J.EMPLID, J.EMPL_RCD, J.EFFDT DESC,J.EFFSEQ DESC) N
FROM PS_JOB J
WHERE EMPLID IN (Provide Emplids))
WHERE N < 5
No comments:
Post a Comment