Friday, March 2, 2012

Find the nth highest salary


Find the nth highest salary
proc sql;
select salary from t e1 
where (n-1)=(select count(*) from t where salary > e1.salary );
quit;


Description

In this code at the place of 'n' we can write the number of highest salary we want .

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.