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 order and group variable in proc report?
how would you determine the number of missing or nonmissing values in computations? : Sas programming
Can you suggest us materials for sdtm mapping?
Given an unsorted data set, how to read the last observation to a new data set?
Describe the ways in which you can create macro variables? : sas-macro
why is sas data integration studio important? : Sas-di
What would you change about your job?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
What is the basic structure of a sas program?
Compare sas with other data analytics tools.
Name and describe few sas character functions that are used for data cleaning in brief.
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
What are the uses of sas?
What are the data types that sas contain?
Difference between informat and format?