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 to generate the test data in sas without input data? : Sas-administrator
explain about various caches available in data integrator? : Sas-di
What do the SAS log messages "numeric values have been converted to character" mean?
for what purpose would you use the retain statement? : Sas programming
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
What do the put and input function do?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
Of all your work, where have you been the most successful?
Describe crosslist option in tables statement?
What is the difference between %local and %global? : sas-macro
Which statement does not perform automatic conversions in comparisons?
Where do you use proc means over proc freq?
what versions of sas have you used (on which platforms)? : Sas programming
If you could design your ideal job, what would it look like?