Code:
empid    emplrcd   effdt   effsq
101          #1    2/1/99    0
101          #1    3/1/13    1
101          #1    23/3/13   1 
101          #1    22/6/13   2
102          #2    20/6/91   1
I need to retrieve row 4, and I have written a partial code, please help me with the other half.

Code:
select a* from Ps_Job a where a.empid = '101' and a.emprcd ='#1' and a.effdt = (select max(a1.effdt) from Psjob1)
...