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

Answer Posted / pallavi

proc sort data=xxx;
by descending sal;
run;
proc sql;
select Sal, monotonic() as count
from xxx
having count in(2,5);
quit;

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what is PROC in SAS?

597


For what purpose would you use the RETAIN statement?

1038


Give an example where SAS fails to convert character value to numeric value automatically?

605


Which statement does not perform automatic conversions in comparisons?

1200


Explain why double trailing @@ is used in input statement?

565






explain the function of substr in sas? : Sas-administrator

550


What do the put and input function do?

582


What is proc sort?

715


If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro

593


what is metadata? : Sas-bi

595


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

1959


what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

602


What is the length assigned to the target variable by the scan function?

668


how to change the execute of macro

1667


How do you control the number of observations and/or variables read or written?

743