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 / biswapratap singh

SELECT MIN(sal) FROM emp WHERE
sal IN (SELECT distinct TOP 3 sal FROM emp ORDER BY sal DESC)

Is This Answer Correct ?    214 Yes 73 No

find out the third highest salary?..

Answer / neha

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

Is This Answer Correct ?    103 Yes 31 No

find out the third highest salary?..

Answer / sanjeev kumar p

select * from emp e1 where (3-1) = (select count(distinct
(e2.sal)) from emp e2 where e2.sal>e1.sal)

Is This Answer Correct ?    99 Yes 51 No

find out the third highest salary?..

Answer / arijit

donno whether the rest are correct ..but this one is:-
select max(sal) from emp where sal<(select max(sal) from emp
where sal<( select max(sal) from emp));

Is This Answer Correct ?    52 Yes 17 No

find out the third highest salary?..

Answer / harmeet

Hi, this query will gives the third highest salary from table

select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);

To dispay 5th highest salary, just change the number 3 to 5.
Like that we can find top N salaries.

I hope i'm not wrong.

Is This Answer Correct ?    44 Yes 16 No

find out the third highest salary?..

Answer / akshita

select * from (select e.*,rownum r from (select distinct
sal from emp order by sal desc) e) where r = 3

Is This Answer Correct ?    43 Yes 16 No

find out the third highest salary?..

Answer / suresh kumar

Hi every body,

I give the standard format Query for this type of top most
and who are the top n people in the organization like that

If we take EMP table

Select * from EMP A where &n= (select count (distinct
(sal)) from EMP B where B.sal>A.sal)

If we give n value 1 or 2 or 3….etc then we gets top one,
top second, and top third person details.

This same query can we use top n people who are earning
maximum salaries in the Organization

Select * from EMP A where &n> (select count (distinct
(sal)) from EMP B where B.sal>A.sal)

Is This Answer Correct ?    38 Yes 19 No

find out the third highest salary?..

Answer / punit chauhan

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


punit chauhan
iMS NOIDA
doing MCA

Is This Answer Correct ?    12 Yes 0 No

find out the third highest salary?..

Answer / punit chauhan

select * from emp_record e1 where (3-1) = (select count ( distinct (e2.salary)) from emp_record e2 where e2.salary > e1.salary

Is This Answer Correct ?    12 Yes 0 No

find out the third highest salary?..

Answer / selvaraj anna university coe

In ORACLE 10g,

SELECT * FROM employee x WHERE 3 = (SELECT COUNT(DISTINCT
salary)
FROM employee y WHERE x.salary <= y.salary);

Is This Answer Correct ?    16 Yes 5 No

Post New Answer

More Oracle General Interview Questions

Explain overloading. Can functions be overloaded?

0 Answers  


How can I create database in oracle?

0 Answers  


Can Multiple instances be run on Single Machine???

3 Answers  


How to declare a local variable?

0 Answers  


What is the function of Optimizer ?

1 Answers  


What is merge in oracle?

0 Answers  


What is the difference between an Oracle Schema and an Oracle Instance?

3 Answers   IBM,


how to get required data from oracle source is like this ram_05_seetha lax_05_viswa bamr05frummy run_01_away sw_sas_trim i want my target data like ram_05_seetha lax_05_viswa to get data using %_05_% but it will give ram_05_seetha lax_05_viswa bamr05frummy how can i get my target data?

1 Answers   Infosys,


What is the usage of save points in oracle database?

0 Answers  


How to do clean up if create database failed?

0 Answers  


The table has 3 columns 4 rows. The output is which column has least null values( A COL SHOULD BE THE OUTPUT) Write the query plz. A B C ================ 1 NULL 2 NULL 3 4 NULL 5 6 7 NULL NULL O/P C = 2 4 6

2 Answers   TCS,


Give the Types of modules in a form?

1 Answers  


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)