ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Testing >> Automation Testing >> Automation Testing AllOther
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions (496)
 Load Runner interview questions  Load Runner Interview Questions (486)
 QTP interview questions  QTP Interview Questions (3503)
 Test Director interview questions  Test Director Interview Questions (161)
 Rational TestSuite interview questions  Rational TestSuite Interview Questions (106)
 Silk Test interview questions  Silk Test Interview Questions (59)
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions (385)
Question
Write a query to find second highest salary of an employee.
 Question Submitted By :: Automation-Testing-AllOther
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
I write this query and it run !!

SELECT max(salary) FROM Employee WHERE Employee.salary <
(SELECT max(salary) FROM Employee)


Plz reply if anyone having generic answer. :-)

Thanks
 
Is This Answer Correct ?    301 Yes 56 No
Ravi
 
Answer
# 2
Select max(salary) from emp where salary NOT IN (Select max
(salary) from emp)
 
Is This Answer Correct ?    93 Yes 14 No
Pradeep Kumar
 
 
 
Answer
# 3
SELECT max(salary) as salary FROM Employee WHERE salary <
(SELECT max(salary) FROM Employee)
 
Is This Answer Correct ?    67 Yes 8 No
Dharmaraj
 
Answer
# 4
select max(sal)from emp e1 where 2<=(select count(*) from
emp e2 where e1.sal <= e2.sal);
 
Is This Answer Correct ?    65 Yes 38 No
Vittal
 
Answer
# 5
Select max(salary) from employee where salary NOT IN
(Select max(salary) from employee)
 
Is This Answer Correct ?    12 Yes 1 No
Upali Tejale
 
Answer
# 6
select *from emp e1 where &n =(select count(*) from emp
where sal >= e1.sal);
 
Is This Answer Correct ?    13 Yes 3 No
Sweety Spear
 
Answer
# 7
select First_Name,Salary from employees where salary in
( select max(salary) from employees
where salary < ( select max(salary) from employees) ),
 
Is This Answer Correct ?    10 Yes 0 No
Priyanshu
 
Answer
# 8
select * from emp A where 2=(select count(*) from emp B
where A.sal < B.sal)
 
Is This Answer Correct ?    41 Yes 36 No
Murlidhar
 
Answer
# 9
Select * from emp e where 2=(select count(Distinct(esal))
from emp where e.esal<=emp.esal)
 
Is This Answer Correct ?    27 Yes 22 No
Lokesh Kanithi
 
Answer
# 10
select sal from
(select rank() OVER (order by sal desc) sno ,sal from emp)
y
where sno= n

here
y : is the alias name for (select rank() OVER (order by sal
desc) sno ,sal from emp)
n : is the number ie if u want second highest sal then 'n'
value will be 2. for third highest n= 3...
 
Is This Answer Correct ?    7 Yes 2 No
Rajkumar Mandala
 

 
 
 
Other Automation Testing AllOther Interview Questions
 
  Question Asked @ Answers
 
how is the best faculty for Selenium in Hyderabad?   2
Can anyone explain data driven frame work and keyword driven frame work..... Bank-Of-America 1
i am looking for HP QTP automated testing software, do you offers reselling this software or should i directly purchase with HP HP 1
How can u enter text in one particular text box? if one webpage contain multiple text boxes, all text boxes with same properties there in no index and Location properties   2
What automating testing tools are you familiar with?   1
i have 100 check box in a link,out of 100 check box in 25 check box their written qtp(any where i dont know),i have to select first check box where 1st qtp found. Cap-Gemini 3
Can object repository be kept in version control and Database(DB) backed up daily ? amazon 1
in my application i am getting different errors at same place. how i capture that errors using less code in qtp. CTS 1
How t o create Libreary files on QTP   2
6. Who will write the use case? 7. What is web based application? Eka-Software 3
how can we reverse the string without using the revese of String function in QTP?   1
what is test complete tool? Which are most important terms in it? please give little introduction of it.   1
 
For more Automation Testing AllOther Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com