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
|
Results 1 to 9 of 9
Thread: How to find second max date?Threaded View
|
Click Here to Expand Forum to Full Width |