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 ? | 6 Yes | 10 No |
Post New Answer View All Answers
Explain how merging helps to combine data sets.
What are the different operating system platforms in which we can use sas? : sas-grid-administration
why is sas considered self-documenting? : Sas programming
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
Compare sas with other data analytics tools.
what is business intelligence? : Sas-bi
Give an example where SAS fails to convert character value to numeric value automatically?
Explain by-group processing?
what is broad cast agent? : Sas-bi
How is character variable converted into numeric variable and vice versa?
How to limit decimal places for the variable using proc means?
how many display types available in sas bi dashboard? : Sas-bi
What do the mod and int function do? : Sas programming
What are the parameters of scan function?
What is run-group processing?