how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / richa
It can be done by first sorting the dataset in the
ascending order of salary and then using the 'point='
option.
For eg:
proc sort data = x;
by salary;
quit;
/*second highest salary*/
data y;
a = 2;
set x point = a;
stop;
run;
/*fifth highest salary*/
data y;
a = 5;
set x point = a;
stop;
run;
| Is This Answer Correct ? | 1 Yes | 9 No |
Post New Answer View All Answers
In sas, what are the areas that you are most interested in? : sas-grid-administration
what is hash files in sas and why we are using this one in sas?
What is the difference between using drop = data set option in data statement and set statement?
What is the difference between nodupkey and nodup options?
What do the SAS log messages "numeric values have been converted to character" mean?
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
what is program data vector? : Sas-administrator
what is sas and what are the functions? : Sas-administrator
What does the trace option do?
What do you know about sas and what we do? : sas-grid-administration
explain what is data set in sas? : Sas-administrator
What is data _null_?
If a variable contains letters or special characters, can it be numeric data type?
What are the ways in which macro variables can be created in sas programming?
Explain what is the use of proc gplot?