how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?

Answer Posted / vidit malhotra

/*Proc RANK method*/
proc rank data=paydept out=order descending ties=dense;
var Salary;
ranks SalaryRank;
run;
proc sql;
select Name,Salary,SalaryRank from order where SalaryRank IN (2,5);
quit;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?

1684


How do you test for missing values?

1053


Where do you use proc means over proc freq?

557


How long can a macro variable be? A token? : sas-macro

713


What are the data types that sas contain?

649






what are sas bi dashboard components? : Sas-bi

653


In sas admin differentiate between roles and capabilities? : sas-grid-administration

552


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

630


describe about physical data integration? : Sas-di

558


What is the use of divide function?

597


Describe a time when you were really stuck on a problem and how you solved it?

2081


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

665


Give e an example of..

1650


where to use sas business intelligence? : Sas-bi

574


How would you determine the number of missing or nonmissing values in computations?

646