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 will I find the first 5 highest salaried employees in
each dept in oracle.

Answers were Sorted based on User's Feedback



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

Answer / sunil panghal

select rownum as row_id,salary from (select salary from
employees order by salary) where rownum <6;

Is This Answer Correct ?    1 Yes 2 No

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

Answer / rammohan

select rownum as row_id,sal from (select sal from
emp order by sal desc) where rownum <6;

Is This Answer Correct ?    1 Yes 2 No

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

Answer / uttam

select sal from (SELECT distinct sal FROM emp order by sal
desc)
where rownum <6

Is This Answer Correct ?    13 Yes 15 No

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

Answer / manjusure@yahoo.co.in

select * from emp e where 5> (select count(max(sal)) from emp
where e.deptno=deptno and sal>e.sal group by sal);

Is This Answer Correct ?    4 Yes 6 No

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

Answer / mihir nasikkar

select *
from employee X
where salary in (select top 5 salary
from employee
where dept = X.dept
order by salary desc)
order by dept, salary desc

Is This Answer Correct ?    2 Yes 4 No

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

Answer / mangesh

SELECT * FROM (SELECT * FROM EMP ORDER BY SALARY desc) WHERE ROWNUM < 6;

Is This Answer Correct ?    0 Yes 2 No

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

Answer / md valiyullah

select max(sal)-5 from emp;

Is This Answer Correct ?    2 Yes 6 No

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

Answer / md valiyullah

select max(sal)-5 from emp where dept = 'sale'
union all
select max(sal)-5 from emp where dept = 'purchase'

Is This Answer Correct ?    0 Yes 4 No

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

Answer / dhanalakshmi

select salary
from employee
where rownum<6
group by deptno,salary
order by salary desc

Is This Answer Correct ?    0 Yes 9 No

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

Answer / tytry

ytytry

Is This Answer Correct ?    0 Yes 9 No

Post New Answer

More Oracle General Interview Questions

How to install oracle odbc drivers?

0 Answers  


hai, when to use char and varchar2....?

2 Answers  


How to write a query with a right outer join in oracle?

0 Answers  


Write query to fetch second maximum salary from employee table.

4 Answers   Bravura Solutions, HCL,


Explain constraining triggers.

0 Answers  


What is Redo Log Buffer in Oracle?

0 Answers   MCN Solutions,


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

0 Answers  


What is Hash Cluster ?

2 Answers  


 How to use an oracle sequence generator in a mapping?

0 Answers   Informatica,


I have table-A(1,2,3)& table-B(3,4,5).what is the different b/w below questions? A union all B? B union all A?

2 Answers   Zensar,


what is insert all statement in sql

2 Answers   CGI, TCS,


T1: T2 A X--- this is updated record B B like this T1 table having no.of records updated. write a query"retrive updated record from T2"

2 Answers   Cognizant,


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)