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

Answer Posted / na

Proc sql;
Select salary
From
Where salary in (select max
(salary) from
Where salary <(select max
(salary) from
));
Quit;
For second salary
calculation

If salary is not repeted
then
Proc sort data= xxx;
By salary;
Run;
Options firstobs =5;
Proc print data = xxx;
Var salary;
Run;

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you specify the number of iterations and specific condition within a single do loop?

615


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

3897


how to read the variables in sas? : Sas-administrator

548


what has been your most common programming mistake? : Sas programming

562


What can you learn from the SAS log when debugging?

913






I have a dataset concat having a variable a b & c. How to rename a b to e & f?

755


What is the SAS data set?

672


What are the different types of sas functions?

603


Explain what is data step?

727


Explain input and put function?

643


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 does the run statement do? : Sas programming

554


What do the PUT and INPUT functions do?

773


How can I remove header from output data set?

2058


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1093