how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / nandu
proc sort data=samp nodupkeys;
by sal descending ;
run;
data samp1 samp2;
set samp ;
ln+1 ;
if ln=2 then output samp2 ;
else samp ;
run;
/*second highest salary obs will come into samp2 dataset */
Is This Answer Correct ? | 3 Yes | 11 No |
Post New Answer View All Answers
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager
What is the command used to find missing values?
how does sas handle missing values in procs? : Sas programming
List down the reasons for choosing sas over other data analytics tools.
How are numeric and character missing values represented internally?
What system options would you use to help debug a macro? : sas-macro
describe about physical data integration? : Sas-di
What is the difference between %put and symbolgen? : sas-macro
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
How is character variable converted into numeric variable and vice versa?
What is the purpose of _character_ and _numeric_?
what is sas metadata server? : Sas-di
How to convert a numeric variable to a character variable?
How sas treats the dsd delimiters?
explain about data integrator metadata reports? : Sas-di