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

i need department wise top 2 employees salary.which logic
i will use

Answer Posted / shyam

select * from
(select ename,job,sal,deptno,
dense_rank()
over(partition by deptno order by sal desc) densrank
from emp)
where densrank<=2;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the uses of a database trigger?

1045


What is string data type in sql?

1150


Explain raise_application_error.

1106


how to convert numeric values to character strings? : Sql dba

1112


Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql

998


Can procedure in package be overloaded?

1090


What does joining a thread mean?

1023


What is localdb mssqllocaldb?

1071


Why do we use sql constraints?

1176


Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?

1011


What are the types of views in sql?

1104


what happens if null values are involved in expressions? : Sql dba

1046


Does google use sql?

970


what are the disadvantages of mysql? : Sql dba

1149


what is a trigger in mysql? Define different types of trigger. : Sql dba

1074