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
What are the statements that are executed only?
Give some examples where proc report’s defaults are same as proc print’s defaults?
How long can a macro variable be? A token? : sas-macro
Explain why double trailing @@ is used in input statement?
How would you identify a macro variable?
Have you used macros? For what purpose you have used? : sas-macro
What are the different operating system platforms in which we can use sas? : sas-grid-administration
What are types of transport files?
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
Give some ways by which you can define the variables to produce the summary report (using proc report)?
What is the use of PROC gplot?
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
What do the SAS log messages "numeric values have been converted to character" mean?
Why and when do you use proc sql?
What is the difference between where and if statement?