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


Please Help Members By Posting Answers For Below Questions

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

1606


What is the command used to find missing values?

588


how does sas handle missing values in procs? : Sas programming

634


List down the reasons for choosing sas over other data analytics tools.

801


How are numeric and character missing values represented internally?

1132






What system options would you use to help debug a macro? : sas-macro

634


describe about physical data integration? : Sas-di

558


What is the difference between %put and symbolgen? : sas-macro

665


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??

2087


How is character variable converted into numeric variable and vice versa?

588


What is the purpose of _character_ and _numeric_?

580


what is sas metadata server? : Sas-di

582


How to convert a numeric variable to a character variable?

628


How sas treats the dsd delimiters?

715


explain about data integrator metadata reports? : Sas-di

558