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 3rd highest salary?

Answers were Sorted based on User's Feedback



Find out the 3rd highest salary?..

Answer / shruti

select empno,sal from
(select empno,sal from emp order by sal desc)
where rownum<4

Is This Answer Correct ?    2 Yes 0 No

Find out the 3rd highest salary?..

Answer / tathagoto

select min(sal) from (select sal from (select sal from
salary order by sal desc) where rownum <
4);

Is This Answer Correct ?    4 Yes 3 No

Find out the 3rd highest salary?..

Answer / sathiskumar

select min(sal) from (select top 3 salary from employee);

Is This Answer Correct ?    1 Yes 0 No

Find out the 3rd highest salary?..

Answer / av.anil

SELECT * FROM
(SELECT Ename,Sal,
DENSE_RANK()
OVER(ORDER BY Sal DESC) "D_RK"
FROM Emp)
WHERE D_RK = 3;

This query gives exact highest salary.

Is This Answer Correct ?    1 Yes 0 No

Find out the 3rd highest salary?..

Answer / jagdish

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 0 No

Find out the 3rd highest salary?..

Answer / vivek

SELECT v.Emp_Sal
FROM Employee_Test v
WHERE 3=
(
SELECT COUNT(DISTINCT z.Emp_Sal)
FROM Employee_Test z
WHERE v.Emp_Sal<=z.Emp_Sal
)

Is This Answer Correct ?    1 Yes 0 No

Find out the 3rd highest salary?..

Answer / shibin k abraham

select * from emp where sal=(select a.sal from emp awhere 3=(select distinct(count(b.sal)) from emp b where a.sal<=b.sal))

Is This Answer Correct ?    1 Yes 0 No

Find out the 3rd highest salary?..

Answer / priyanga.g

1) Select MAX(salary) from Programmer where salary not
in(select top 2 salary from Programmer order by salary desc)



2) Select max(salary) from programmer where salary<
(select MAX(salary) from Programmer where salary<(select
MAX(salary) from Programmer))


3) Select MAX(salary) from Programmer e where 2=(select
COUNT(*) from programmer b where b.salary>e.salary )

Is This Answer Correct ?    1 Yes 0 No

Find out the 3rd highest salary?..

Answer / ratnakar

select max(sal) from emp a where 3=(select count(sal) from
emp b where b.sal >=a.sal;

Is This Answer Correct ?    10 Yes 10 No

Find out the 3rd highest salary?..

Answer / sheik

select top 1 * from(select top 3 *from emp order by salary
desc)d order by salary asc

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

what is clause? : Sql dba

0 Answers  


What is serial sql?

0 Answers  


how to retrieve the top 2 salaried persons from a database?

7 Answers   Orion Laboratories,


what is a constraint? : Sql dba

0 Answers  


1. what is the exact use of hint in sql. 2. How we can avoid index scan in sql even though index is there in the table.

1 Answers   Polaris,


what is autonomouse transaction?

3 Answers   Oracle,


I Defined SP1, Sp2 (sp=StoreProcedures)In Package Specification but I Implemented Sp1, sp2, sp3, sp4, sp5 then What type of Error You will find????

3 Answers   Infosys,


How many subqueries can be nested in a statement?

0 Answers  


Create a procedure to delete certain records from a table and display the total number of records deleted in this process. (Condition for deletion can be of ur choice, for instance delete all records where eid='')

2 Answers  


Explain some predefined exceptions.

0 Answers  


Can we have two clustered index on a table?

0 Answers  


Explain the two type of Cursors ?

8 Answers   Hi Caliber IT,


Categories