how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / vijay
proc sort data=samp out= samp1 nodupkeys;
by sal descending _all_;
run;
/*second highest salary obs will come into samp2 dataset */
/*for fifth highest salary obs change slice value from 2 to 5 */
data samp2;
slice = 2;
set samp1 point = slice;
output;
stop;
run;
Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is the difference between where and if statement?
What is the use of function Proc summary?
What is the role of administrative users? : sas-grid-administration
Describe the ways in which you can create macro variables? : sas-macro
How sas treats the dsd delimiters?
Mention what are the data types does SAS contain?
Which statement does not perform automatic conversions in comparisons?
How would you identify a macro variable? : sas-macro
what is the primary data source for the wrs? : Sas-bi
What is the sas data set? : sas-grid-administration
how does sas handle missing values in sort order? : Sas programming
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
How is character variable converted into numeric variable and vice versa?
Name types of category in which SAS Informats are placed?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya