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 check the 3rd max salary from an employee table?

Answer Posted / rutujagabhane

SELECT *
FROM(
SELECT SALARY, DEPARTMENT_ID,EMPLOYEE_ID, DENSE_RANK() OVER (PARTITION BY DEPARTMENT_ID ORDER BY SALARY DESC) AS RN
FROM EMPLOYEES
)
WHERE RN = 2
;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use join in subquery?

1021


What is pessimistic concurrency control? : Transact sql

1023


Does truncate free space?

943


What is ttitle and btitle?

1006


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

897


Explain scalar functions in sql?

1014


How can I make sql query run faster?

956


How do I count rows in sql query?

937


What are some emotional triggers?

927


What is dml and ddl?

896


What are sql objects?

1011


What are the different sql languages?

984


What is self-join and what is the requirement of self-join?

1088


What is the use of procedures?

923


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1976