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


find out the third highest salary?

Answers were Sorted based on User's Feedback



find out the third highest salary?..

Answer / dilip tiwari

THis is for Oracle

SELECT * FROM emp
(SELECT empname,Salary,dense_rank() OVER(ORDER BY salary
DESC) AS ranking FROM emp)
WHERE ranking = 3

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / bhagayraj

SELECT *
FROM Emp e1
WHERE (2) = (
SELECT COUNT(DISTINCT(e2.Salary))
FROM Emp e2
WHERE e2.Salary > e1.Salary)

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / rajeevgeu

select rownum,salary from(select rownum r,salary from emp order by salary)where r=3;

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / madhu

To find nth salary:

SELECT SUBSCRIBER_no
FROM (SELECT SUBSCRIBER_NO, ROWNUM R
FROM (SELECT DISTINCT SUBSCRIBER_NO
FROM SUBSCRIBER
ORDER BY SUBSCRIBER_NO DESC))
WHERE R = &R

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / sukanya

select max(sal) from emp where sal<
(select max(sal) from emp where sal <
(select max(sal) from emp));

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / daji surwase

select salary
from employees
order by salary desc
offset 2 rows fetch next 1 row only;

Is This Answer Correct ?    0 Yes 0 No

find out the third highest salary?..

Answer / chandiran

select * from (select sal, rownum r from Employee
order by sal desc)
where r=3

Is This Answer Correct ?    1 Yes 2 No

find out the third highest salary?..

Answer / ayaz mahmood

select max(sal) from emp
where sal= (select max(sal) from emp
where sal< (select max(sal) from emp
where sal< (select max(sal) from emp)))

Is This Answer Correct ?    1 Yes 2 No

find out the third highest salary?..

Answer / haneef

Best One

select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc

or

It also work

select top 1 * from test_emp where sal in (select top 3 sal
from test_emp order by sal desc) order by sal asc
select top 1 MAX(sal),id from test_emp where sal < (select
max(sal) from test_emp where sal < (select max(sal) from
test_emp))
group by id,sal order by sal desc

Is This Answer Correct ?    0 Yes 1 No

find out the third highest salary?..

Answer / abhay

Select Top 1 sal from (select distinct top 3 sal from emp
order by sal desc)a order by sal

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Oracle General Interview Questions

What is the meaning of recursive hints in oracle?

0 Answers  


Can group functions be used in the order by clause in oracle?

0 Answers  


How to connect to a remote server?

0 Answers  


Explain the use of rows option in imp command.

0 Answers  


What is a named program unit?

0 Answers  


 How to use an oracle sequence generator in a mapping?

0 Answers   Informatica,


How do I limit the number of rows returned by an oracle query after ordering?

0 Answers  


How to update values in a table in oracle?

0 Answers  


what is reindexing?

0 Answers   Tata Technologies,


What happens to the current transaction if a ddl statement is executed?

0 Answers  


What is a user account in oracle?

0 Answers  


you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz

0 Answers   iFlex,


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)