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
How do you delete duplicate observations in sas?
How can you create a macro variable with in data step? : sas-macro
what is operational data and operational system? : Sas-di
What are the uses of sas?
What are the automatic variables for macro? : sas-macro
what is study design in while working with SAS? what are screening variables in SAS?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
What is the difference between proportion and average?
it will become easy if uuu provide website linkssss and list of consultanciessssss
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
Describe the function and untility of the most difficult SAS macro that you have written.
What is a pdv and what are its functions?
What is the difference between one to one merge and match merge? Give an example.
what are some differences between proc summary and proc means? : Sas programming
Define run-group processing?