It is a SQL question. Write a query to find top three
salaries in an EMP TABLE?

Answers were Sorted based on User's Feedback



It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / pardeep kumar

In the Above post i have given top third salary from the
table.
Now the Query for the top three salaries.

Select distinct Top 3 EmpSal from tbEmployee order by
EmpSal Desc.
Pardeep Kumar

Is This Answer Correct ?    6 Yes 0 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / harish

Sorry ..above one is to find lowest threee...

This is for highest 3 salaries -

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

Is This Answer Correct ?    10 Yes 5 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / ruchi

In MYSQL:
select salary from (select salary from tbl_salary t order
by salary desc) as u limit 3;

u is the table alias,which is a must.

Is This Answer Correct ?    2 Yes 1 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / saranya

select salary from(select salary from tablename order by
salary desc) where rownum < 4

Is This Answer Correct ?    2 Yes 1 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / pardeep kumar

Let I have EmpSal column in the tbEmployee table.


Select Min(EmSal) from tbEmployee where EmpSal IN(Select
Distinct Top 3 EmpSal From tbEmployee order by empsal Desc)


If this helps you then send me the mail at
pardeep_dhiman86@yahoo.co.in

Is This Answer Correct ?    2 Yes 1 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / harish

select salary
from (select salary from tablename order by salary)
where rownum < 4;

Is This Answer Correct ?    7 Yes 7 No

It is a SQL question. Write a query to find top three salaries in an EMP TABLE?..

Answer / ravi kumar battula

for max 3 salarie:

SELECT TOP 3 sal from( Select DISTINCT max(sal)ORDER By sal
DESC) Order by sal;

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

How to use output values in qtp ?

0 Answers  


Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)

0 Answers  


QTP is used better in which type of application Web based application or desktop application

3 Answers  


How many ways we can parameterize data in quicktest professional?

0 Answers  


. Types of properties that Quick Test learns while recording?

2 Answers  






How do you compare the structure of 2 tables in database and check whether they are similar using qtp.

0 Answers  


How do u do batch testing in WR & is it possible to do in QTP, if so explain?

1 Answers   Crea,


how to lunch the application in the qtp tool ?

3 Answers  


Which is the best testing institute for QTP training in Hyderabad.

25 Answers   Wipro,


How can i learn Descriptive programming in QTP. Please reply.

3 Answers  


What are benefits of qtp?

0 Answers  


How can we automate Capthca on registration or any contest forms ? Is it possile to Automate Webpages with Falsh using QTP..?

1 Answers  


Categories