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 / vidit malhotra

/*Proc RANK method*/
proc rank data=paydept out=order descending ties=dense;
var Salary;
ranks SalaryRank;
run;
proc sql;
select Name,Salary,SalaryRank from order where SalaryRank IN (2,5);
quit;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is sas business intelligence? : Sas-bi

1094


What is program data vector (pdv)?

1192


what do the pad and dim functions do? : Sas programming

963


How do dates work in sas?

1074


What is the function of output statement in a SAS Program?

1010


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

959


For what purposes have you used sas macros? : sas-macro

954


What are the ways to do a “table lookup” in sas?

978


explain the proc in sas? : Sas-administrator

1037


What are the five ways to do a table lookup in sas? : sas-grid-administration

995


Enlist the syntax rules followed in sas statements.

1034


what are informats in sas? : Sas-administrator

1018


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

2164


Name few SAS functions?

1043


what is treatment emergent events and treatment emregent adverse event

2325