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?

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 ?    6 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the categories that sas informats are used to the place the data? : Sas-administrator

1049


How to create an external dataset with sas code?

1157


what is the function of catx syntax? : Sas-administrator

1101


how can you import .csv file in to sas? : Sas programming

1098


What is connection profile? : sas-grid-administration

1173


Describe the ways in which you can create macro variables?

1193


why is a stop statement needed for the point=option on a set statement? : Sas programming

1083


What are the features of base sas system?

1066


What is the difference between match merge and one to one merge?

1248


Approximately what date is represented by the SAS date value of 730?

1217


What is proc sort?

1217


describe about metadata object? : Sas-di

1068


What is the sas data set? : sas-grid-administration

985


What are the difference between the sas data step and sas procs?

1185


What is the difference between using drop = data set option in data statement and set statement?

1159