how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?
Answer Posted / richa
It can be done by first sorting the dataset in the
ascending order of salary and then using the 'point='
option.
For eg:
proc sort data = x;
by salary;
quit;
/*second highest salary*/
data y;
a = 2;
set x point = a;
stop;
run;
/*fifth highest salary*/
data y;
a = 5;
set x point = a;
stop;
run;
| Is This Answer Correct ? | 1 Yes | 9 No |
Post New Answer View All Answers
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
how sas deals with business intelligence? : Sas-bi
Tell me more about the parameters in macro? : sas-macro
how to remove duplicates using proc sql?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
Mention the difference between ceil and floor functions in sas?
If a variable contains only numbers, can it be a character data type?
Describe a time when you were really stuck on a problem and how you solved it?
What is SAS? What are the functions does it performs?
Do you need to rearrange the order of the data for the report?
what is the difference between floor and ceil functions in sas? : Sas-administrator
What does proc print, and proc contents are used for?
what is sas and what are the functions? : Sas-administrator
I have a dataset concat having a variable a b & c. How to rename a b to e & f?