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
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 |
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 |
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 |
Answer / saranya
select salary from(select salary from tablename order by
salary desc) where rownum < 4
Is This Answer Correct ? | 2 Yes | 1 No |
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 |
Answer / harish
select salary
from (select salary from tablename order by salary)
where rownum < 4;
Is This Answer Correct ? | 7 Yes | 7 No |
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 |
can we take 'dim my pen is good' as a paramerter
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
want to learn real time automation project(QTP)?
Can you brief the hurdles you faced during Automation testing?
can we run the scripts of qtp 8.2 in the qtp7.0?
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
How many ways we can parameterize data in QTP?
What is Object Spy?
How can we open an Excel sheet through the script
How does qtp recognize objects in aut?
What are all the common questions asked for the candidates having more than 1 yrs exp in QTP?
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...?