Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

More SAS Interview Questions

What is the difference between nodup and nodupkey options?

20 Answers   iFlex, Makro, Talwar,


how does sas know on which server the piece of code to be executed ? say if a proc olap code is written then how the sas application would detect on which server to execute.

1 Answers   TCS,


The Lion King is hosting an animal conference. All the animals in the world attend except one. Which animal does not attend?

6 Answers   Oracle,


What is a post baseline?

1 Answers  


How does the internal authentication work in sas? : sas-grid-administration

0 Answers  


what is the difference btw proc means and proc univariate?

8 Answers   HSBC, TCS,


What is a put statement?

0 Answers  


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

0 Answers  


what is the usage for assigning error=1 in a dataset ?

2 Answers   Satyam,


what are the different ways of merging two datasets.name atleast 4.

2 Answers  


How to get the repeated values by using sql in sas ?

2 Answers  


How would you compile all macros from a folder in a study, within the autoexec program?

1 Answers  


Categories