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 (3497)
 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
 
What are the limitations of automating software testing?   1
Which of the Test cases can be automated? can anybody tell me with an example. IBM 4
how many steps in functional testing? TCS 4
I have a web page.In that i have two links called "gmail" and "gmail". Both links are look same.One link is at top of the page and other link is at bottomn of the page. How the automation tool can be recognized these link and make to click the link i want?   5
How will you choose a tool for test automation?   3
Do you support automated testing? Why?   6
WHAT IS THE ARCHITECTURE OF QTP? IS THE ARCHITECTURE AND FRAMEWORK BOTH ARE SAME? Leo-Technologies 1
how to connect qtp to qc. what are the steps ? Value-Labs 1
Describe any bug you remember? Ordain-Solutions 1
what is client server application.   2
how can we reverse the string without using the revese of String function in QTP? CapitalSoft 3
Can anybody tell me the any open source automation testing tool for functional testing to test web based application.? pls suggest its urgent.   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