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 |
How to resume the second iteration in the QTP,, if the error has intrupted the the second iteration. When i use run from step it starting from the first iteration again.
How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance
How will you handle java tree in qtp?
What are the Features & Benefits of Quick Test Pro (QTP 8.0)?
Can we test the Word Document using QTP Tool? We should test the page size,page set up, paragraph indentation and spacing, font size of the the character int the page.
What are the different attribute used with regular expression?
What is the use of environment variables?
In how may ways we can use checkpoints to an application using QTP?
Can u explain about QTP framework
Can we do Load Teting with QTP?
i did B.Tech cse and i secured 76%. instead of siting at home ... i would like to do some course. can u suggest me in this.
how can we handle exceptional handling in qtp