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

Which is better trigger or stored procedure?

950


What is trigger in pl sql with examples?

1040


what tools available for managing mysql server? : Sql dba

1083


Why plvtab is considered as the easiest way to access the pl/sql table?

1216


Is join same as left join?

1037


what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure

1748


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2571


Why we use cross join?

952


What are local and global variables and their differences?

1090


what is single byte over head in oracle..?

2401


What is the difference between left join and right join?

942


what is a view? : Sql dba

1088


What is primary key and foreign key?

960


Mention what plvcmt and plvrb does in pl/sql?

1143


What is sql in java?

1082