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
how can you create zero observation dataset? : Sas programming
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;
What are the data types that sas contain?
Explain input and put function?
Mention some common errors that are usually committed in sas programming.
Give e an example of..
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
How you can read the variables that you need?
what is the use of proc contents and proc print in sas? : Sas-administrator
Can you explain the process of calendar?
Explain the purpose of retain statement.
What does the RUN statement do?
what is business intelligence? : Sas-bi
what does the run statement do? : Sas programming
why a stop statement is needed for the point= option on a set statement?