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
how will you locate the sas platform applications? : Sas-bi
What are the data types does SAS contain?
In ARRAY processing, what does the DIM function do?
what are sas bi dashboard components? : Sas-bi
which features do you use to check the data validations and errors? : Sas-administrator
What is SAS informats?
What will calendar procedure do?
what is data governance? : Sas-di
How can you create a macro variable with in data step? : sas-macro
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation
Do you need to know if there are any missing values?
Can you explain the process of calendar?
What is the basic syntax of a sas program?
How will you generate test data with no input data?
What is program data vector (pdv) and what are its functions?