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...

Query for second maximum salary in each in each department

Answer Posted / ram

SELECT empno,salary,dept_id FROM (SELECT empno,salary,dept_id,DENSE_RANK() OVER (PARTITION BY Dept_id ORDER BY Salary DESC)
as Rnk FROM emp) WHERE Rnk = 2;

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an inner join sql?

1039


What is sql indexing?

1016


what is column? : Sql dba

1014


What is informix sql?

985


what are string data types? : Sql dba

1049


Is record in oracle pl sql?

975


what is view? : Sql dba

977


List the ways to get the count of records in a table?

903


explain the difference between bool, tinyint and bit. : Sql dba

1015


what is a unique key ? : Sql dba

1102


What schema means?

893


How do you concatenate in sql?

1034


what is the stuff function and how does it differ from the replace function? : Sql dba

1062


What does truncate mean in sql?

1035


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

1010