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

Explain data driven framework?

0 Answers  


How u perform exception handling in QTp,what is other name for ths

1 Answers   Lehman Brothers,


Hi all, i have installed QTP8.2 in my system. but script is not generating while recording. What is the problem? is any file missing? pls let me know anybody...Thnaks

3 Answers  


Is it possible for QTP to capture the objects in word document.If so please give me the code.Thank you.

2 Answers  


what type of run time errors you get while you ar edoing rpg program?

0 Answers  






why we use check points , In qtp we use the any check points , what r they , when and why

1 Answers   Polaris,


How do you find out whether the string is Numeric or Alpha numenric.Suppose..'QTP is an automation testing tool 12345' How should I know it is alphanumeric.Can any one please write the code for this

4 Answers  


We have an action attached with the library file in QTP. When I will click on run button,which file is going to be executed first a)Action b)Library

1 Answers  


QTP 1.What type of bugs u commonly find in u r project? 2.what is agile testing explain with example? 3.application is given req n functionality r missing then how can u start testing? 4.what r the types of defect tracking tools? 5.what is functionality testing? 6.what is change req how u use it? 7.diff bet gul n functional testing? 8.test cases for IE 6.0? 9.where do u store test cases? 10.what r design objects in qtp? 11.what r 5 types of objects in qtp? 12.how to change .mtr to .tsr n vice versa? 13.in which situations qtp will not recoznize objects? 14.how to call .vbs fuctions, library files in qtp? 15.if 10 windows r ope write command to close all windows in qtp? 16from what stage u start automation in u r project? 17.what is VSS? it is usedin automationr manual? 18.size of object repository? 19.how to conduct GUI testing n performance testing on MS-Word? what r performance TEST CASES? 20. use of virtual objects explain? 21.how to connect buzilla with qtp? 22. what is API ? 23.how to merge 2 object repositories in qtp? 24.what is recovery scenario manager? 25. diff bet link n hyper link? 26.diff bet test case n test case scenario? 27.what is relational testing? 28.where do we write test cases? 29.what is base line in testing? 30.what r key process areas(KPA) in u r company? 31.what is hot fix? 32.what is sql injection? 33.what is valnerability? 34.what is TOM in qtp? 35.can we do qtp testing with out creating objects in object repository? can we completely write code in expert view only? 36.where we cant do automation testig? give example using OR is a advantage r a disadvantage?

6 Answers   IBM,


how to create the varibles and how these are connect to qtp? plz tell me

3 Answers  


how can i add an action(external action) programmatically?

3 Answers   Ordain Solutions,


actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.

1 Answers  


Categories