how will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / kanha

Select E1.* From(Select Ename,Deptno,Sal,
Dense_Rank()over
(
Partition By Deptno Order By Sal Desc
)"Top Sal"
From Emp)E1
Where "Top Sal"<=5 Order By Deptno,Sal Desc;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

612


How to build data dictionary view an new database?

532


How many types of tables are there in oracle?

576


What is meant by recursive hints in oracle?

618


In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??

1365






How to define a data source name (dsn) in odbc manager?

529


What is a system tablespace?

600


How to create a new table in your schema?

607


What is the data pump import utility?

583


How to convert character types to numeric types?

578


How does one get the view definition of fixed views/tables?

604


How to convert characters to dates in oracle?

559


How to end the current transaction in oracle?

559


WHAT IS ecc 6.0

1663


i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?

1470