how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / pricil kurian
/*sort employee table by salary in desending order */
proc sort data=xx nodupkey;
by descending sal ;
run;
/*outputting the second and 5th largest salary to then yy
dataset */
data yy;
set xx;
if _n_ in (2, 5) then output;
run;
Is This Answer Correct ? | 35 Yes | 13 No |
Post New Answer View All Answers
WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?
what are 5 ways to perform a table lookup in sas? : Sas-administrator
what is sas database server? : Sas-di
How to limit decimal places for variable using proc means?
I have a dataset concat having variable a b & c. How to rename a b to e & f?
How do you convert basic cube to transaction cube and transaction cube to basic cube?
how can you put a "trace" in your program? : Sas programming
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
what is the use of sas management console? : Sas-di
what are the considerations when picking a SAS/STAT procedure?
Explain the special input delimiters used in sas programming.
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
What are the differences between proc means and proc summary?
What is the use of stop statement?
What are the statements in proc sql?