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 are types of exception?

892


What are the features of pl sql?

1038


What is clustered index in sql?

1020


What are the types of join in sql?

1054


Is sql microsoft?

1003


How do you update a table in sql?

947


Mention what is the use of function "module procedure" in pl/sql?

1026


What is the difference between jpql and sql?

1052


Is oracle and sql same?

974


Can we create clustered index without primary key?

925


what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

922


how many triggers are allowed in mysql table? : Sql dba

1024


How do I enable sql encryption?

989


What are the query optimization techniques?

903


What are the parameter modes supported by pl/sql?

1040