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

Pls can anyone give me the entire code for the Keyword driven framework with respect to he Flight Reservation Window in detail with explanation. Pls explain in detail stepwise. Thanks a lot. Pls very urgent?.

0 Answers   Logix,


How to export data present in Datatable to an ".xls" file?

1 Answers   Crea,


Is the qtp course will help to create a virtual object?

0 Answers  


What are the types of environment variables in qtp?

0 Answers  


interviwer asks what is data table? my ans is Data table is an internal Excel file of QTP...intervier not happy with this also? can u post any other answer?

3 Answers   Accenture,






What is positive test case and Negative Test case? What is the meaning of Real World Scenario's?

2 Answers   TCS,


tell me about framework types and most used framework in real time. types of output value in details. diff between wr and qtp in detail.

2 Answers  


Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas.

3 Answers   IBM,


what is recovery manager and recovey scenerio?

2 Answers   BirlaSoft,


What are the major/ important methods, functions in QTP we use realtime testing

0 Answers  


How to change the run-time value of a property for an object?

3 Answers   Crea,


How to parameterize a text field and the same field as combo field on next page. Means inserting values in Text field will appear in the combo field. for example country name, state name. Kindly reply it is urgent !!!

1 Answers   Adobe,


Categories