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 are the metrics in general we use in testing
How to open a new test using quicktest professional (qtp)?
what will be there in keyword view and expert view?
How many actions we can create with in a test?
Connect to QC using AOM.
What is the Dynamic Scenario in QTP? And also anybody give the example for this?
When there is descriptive programming, why do we go for Object repository for desigining scripts.?? why cant we use descriptive programming instead of using the Object repository..??
4 Answers DST Global Solutions,
If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?
Tell me the difference between the Data Driven Frame work and Keyword Driven frame work?
What is fragmentation and paging?
When you are running a batch test of 5 scripts and in 2nd script appln crashed, what hpns then?
can anyone please tell me which is the best institute for learning QTP and Automation Testing tools in hyderabad with realtime examples and scenarios...I heard about many institutes in Ammerpet hyderabad i.e Suresh Reddy's Smart Solutions, Ashwin Palaparthi's Tech Teach,SUNNYSOFT, SITE institute, I-VINTAGE, siritechnologies and sriven institute..pls suggest me which to choose for learning QTP....Which institute has fasttrack option?