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
Describe the ways in which you can create a macro variable?
how do you debug and test your sas programs? : Sas programming
Explain translate function?
Intern stastical programmer written test
How are numeric and character missing values represented internally?
What are the statements in proc sql?
explain the key concept of sas? : Sas-administrator
In sas admin differentiate between roles and capabilities? : sas-grid-administration
sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately
what are the categories that sas informats are used to the place the data? : Sas-administrator
what is hierarchy flattening? : Sas-di
what is data integration? : Sas-di
How can you limit the variables written to output dataset in data step?
Give an example where SAS fails to convert character value to numeric value automatically?
Explain how merging helps to combine data sets.