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 |
What is output value in QTP? Why do we use the output value in QTP?How many types of output values are there in QTP? what are their respective usage in QTP?
how to calculate no. of repeating characters in a a string..please give me the code
What is difference between design time and run time data table?
Explain the views in the QTP GUI?
HI ALL I AM WORKING AS A AUTOMATION ENGINEER FROM PAST 2 MONTHS IN QTP,MY QUESTION IS IF I OPEN THE BROWSER FIRST & THEN THE QTP LATER MY OBJECT SPY WILL NOT WORK,Y IT IS SO..IF U HAVE THE ANSWER PLZ MAIL ME AT AKSHAR.MYSORE@GMAIL.COM
what is the diffrence between script and Language ? (Chandana)
Is the provision for integrating QTP with QC ,available from the version 9.0 onwards only or even 8.2 version has such provisions?
what does it mean when a check point is in red color? what do u do?
How to test menu options using qtp
Hi Samrat, Thank u very much, what u said it is right.
can u expect, major bugs in NET BANKING Project? Modules Transaction Module, Customer Relation Module.
how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up