select * from
(select a.*, rank() over(order by hiredate) as rank_date
from emp a)
where rank_date=2

it's probably semi correct, you probably have to look at dense_rank function, I forgot now since I dont have the docs handy