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

can we take 'dim my pen is good' as a paramerter

2 Answers  


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,


want to learn real time automation project(QTP)?

1 Answers  


Can you brief the hurdles you faced during Automation testing?

0 Answers  


can we run the scripts of qtp 8.2 in the qtp7.0?

1 Answers  






hi i have one issue while coding the dates . i want to add the date curret to 4 days . can any one helme plz about this regards balaji

2 Answers  


How many ways we can parameterize data in QTP?

2 Answers  


What is Object Spy?

8 Answers  


How can we open an Excel sheet through the script

8 Answers   eSymbiosis,


How does qtp recognize objects in aut?

0 Answers  


What are all the common questions asked for the candidates having more than 1 yrs exp in QTP?

1 Answers  


I got an error "The"flightres" Dialog was not found in the Object Repository. Check the OR to confirm that the object exists or to find the correct name for the object." while running the following script Set flightres=description.Create() flightres("text").value="Login" flightres("Class Name").value="Dialog" Set agent = description.Create() agent("nativeclass").value="WinEdit" agent("attachedtext").value="Agent Name:" Set pwd = description.Create() pwd("nativeclass").value="WinEdit" pwd("attachedtext").value="Password" Set button = description.Create() button("nativeclass").value="WinButton" button("Text").value="OK" Dialog("flightres").WinEdit("agent").Set "test" Dialog("flightres").WinEdit("pwd").Set "mercury" Dialog("flightres").WinButton("button").Click Please let me know if i made any mistake in the above script...?

4 Answers  


Categories