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 validate email?email ie correct or not ?with below conditions. 1)before @(symbol) only alphbates and min 4 char to max 15 chars. 2)before @(symbol) only alphabates dont use ant special chars or numarics 3) after @(symbol) only one dot(.)symbol for ex:abc@gmail.com it is valid email or not based above conditons
How u prepare Test result summary in QTp?
write script for , launching fr window,login and create 5 elements array and store 5 order numbers inthat array? and open order by using order no.s in array and find out maximum tickets booked by which order?
We have an application which generates links( more than thousand) based on the time stamp dynmically.Each link will download an xls file. we are supposed to click a particular link (which link to click will be obtained thru some buisiness logic).Now the issue is QTP is not recogniging the link(say Var1) though its properties showed mandatory fields text=xyz and html tag=A.I used following code to do this. Browser("ABC").Page("123").Link("text:=" &Var1,"html tag:=A").click, can any one suggest why this is not recognised by QTP though syntax is correct?(Is there any sync issue to be considered?Because on clicking the link it will take 5 mins to open that file)
What does Reporter.Reortevent2 does?
How can I import environment from a file on disk?
can any one tell me what is syntax error in line msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist 'code ************** Call login("lal="," " ) wait(5) Call errormsg("Invalid email address. [?]" ) Function errormsg(msg) msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist if msgexist then Reporter.ReportEvent micPass,"enter valid username or pwd ",msg else Reporter.ReportEvent micFail, "entered valid uname and pwd",msg end if End Function
Can anybody give the script to addsheet, add column,add values under that column in the rows??
the build is develeped in Java. is possible to write scripting in vb using QTP ?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?
What are the main features we have to compulsory test by using qtp in an web based application
What is AUT in object reposity in QTP? Why we use it in Object repository???What is full form???????