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 materialized view in sql?

916


Does oracle use sql?

926


What is a dynamic query?

1016


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

1063


How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000

2163


List the various privileges that a user can grant to another user?

1036


- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?

1823


What are the two types of exceptions in pl/sql?

1047


How do I view a table in sql?

1001


what are the join types in tsql? : Transact sql

1060


What is normalization in sql?

1009


how to check server status with 'mysqladmin'? : Sql dba

1071


What are the most important characteristics of pl/sql?

1149


Which is better trigger or stored procedure?

944


Is pl sql different from sql?

987