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 versions of SAS have you used (on which platforms)?
What are all the problems you faced while validating tables and reports?
what is star schema? : Sas-di
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming
What is connection profile? : sas-grid-administration
List out some key concept of SAS
What are symget and symput? : sas-macro
explain what is factor analysis? : Sas-administrator
In sas admin differentiate between roles and capabilities? : sas-grid-administration
What is the use of the %include statement?
what is the purpose of _error_? : Sas programming
how to generate the test data in sas without input data? : Sas-administrator
Explain the special input delimiters used in sas programming.
explain the proc in sas? : Sas-administrator
What are types of transport files?