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 / durgashivashankar

select min(sal) from (Select rownum,sal FROM emp> Order
by sal desc)
where rownum<=3

Is This Answer Correct ?    0 Yes 0 No

Find out the 3rd highest salary?..

Answer / nikhilesh roy

WITH
CTE as
(select emp_id,salary,rn=row_number() over (order by salary desc) from emp_table )
select * from CTE where rn=3;

Is This Answer Correct ?    0 Yes 0 No

Find out the 3rd highest salary?..

Answer / virendra

select ename, salary from emp where salary=(select top 1
salary from (select distinct top 3 salary from emp order
by salary desc) a order by salary)

Is This Answer Correct ?    7 Yes 8 No

Find out the 3rd highest salary?..

Answer / ajay kumar

SELECT DISTINCT SAL FROM EMP WHERE SAL = (SELECT DISTINCT
SAL FROM EMP X WHERE &N= (SELECT COUNT(DISTINCT SAL) FROM
EMP Y WHERE Y.SAL>X.SAL))
/
AFTER RUNNING THE QUERY PUT THE VALUE OF N

Is This Answer Correct ?    0 Yes 1 No

Find out the 3rd highest salary?..

Answer / sachin saini

select min(salary) from table_name where salary in(select
top 3 salary from table_name order by salary desc )

Is This Answer Correct ?    0 Yes 1 No

Find out the 3rd highest salary?..

Answer / abhijt shinde

select MIN(salary) from Employees
where salary IN
(Select Top 3 salary from Employees order by salary desc)

Select Top 1 salary from Employees where salary
Not IN(select Top 1 salary from Employees order by salary Desc)
order by salary Desc

Is This Answer Correct ?    0 Yes 1 No

Find out the 3rd highest salary?..

Answer / arindam

select min(sal) from
(
select sal from
(
select distinct sal from emp order by sal desc
)
where rownum<=3
)
where rownum <4

Is This Answer Correct ?    5 Yes 7 No

Find out the 3rd highest salary?..

Answer / srikanth

select * from (select e.*,rank() over(order by salary desc
nulls last) sal_rnk from employee e)where sal_rnk=3;

Is This Answer Correct ?    3 Yes 5 No

Find out the 3rd highest salary?..

Answer / vishal beri

Select ename from emp e where 2=(select count(distinct(Sal))
from emp where sal>e.sal)

Is This Answer Correct ?    3 Yes 5 No

Find out the 3rd highest salary?..

Answer / suneel

select level,max(sal)from af where level=3 connect by prior
sal>sal group by level;

Is This Answer Correct ?    8 Yes 11 No

Post New Answer

More SQL PLSQL Interview Questions

Explain two virtual tables available at the time of database trigger execution.

1 Answers  


HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)

8 Answers   BeBo Technologies,


What are the most important ddl statements in sql?

0 Answers  


diff b/w sub query and co-relater query?

3 Answers   iFlex,


Are sql connections encrypted?

0 Answers  


What is pl sql architecture?

0 Answers  


What is a sql statement?

0 Answers  


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

0 Answers   CTS,


How do you write an index?

0 Answers  


Can we use delete in merge statement?

0 Answers  


How to add new employee details in an employee_details table with the following details

0 Answers  


What is posting?

0 Answers  


Categories