Write a query to find second highest salary of an employee.
Answers were Sorted based on User's Feedback
Answer / aj.com
SELECT MAX(SALARY) FROM EMPLOYEE WHERE SALARY NOT IN (SELECT
MAX(SALARY) FROM EMPLOYEE)
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / shyam
select max(salary) as '2nd Highest Salary'
from Employee a
where 2<=(select count(*) from Currencies b where a.salary
<= b.salary);
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / nilesh chaudhari
Select max(Salary) as 'Second Highest Salary' from Employee
where USdollar NOT IN
(Select max(Salary) from Employee)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saravanan.s
select max(salary) as salaryemp from employee where
employee.salary<(select max(salary) from employee)
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / rajesh kole
SELECT MIN(Sal) FROM Employee
WHERE Sal IN
(SELECT TOP 4 Sal FROM employee ORDER BY Sal DESC)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sup
SELECT TOP 1 salaryamount
FROM (
SELECT DISTINCT TOP 3 salaryamount
FROM mstsalary
ORDER BY salaryamount DESC) a
ORDER BY salaryamount
--sup--
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / hardit
select TOP 1[salary]
from(
select distinct TOP 2[salary]
from empTable
order by salary desc
) a
order by salary
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kedo
select sal from
select * from employee orderby salary DESC
Limit 1,1
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / harikrishna ravipati
select max(sal) from emp where sal <
(select max(sal) from emp)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chandramami
SELECT MAX(e.salary)
FROM emp e,emp e1
WHERE e.salary<e1.salary;
| Is This Answer Correct ? | 0 Yes | 0 No |
what is GDC
Define behavioral testing
What are software testing metrics
I was asked these questions during a job interview question. I totally stumbled on # 1 and for # 2 even though I answered but not a very convincing way. I would appreciate a concise and well phrased asnwers: 1) During SDLC, when would you be asked to take it "offline" 2) Throughout SDLC process, where would you implement test automation and why?
How to integrate Rational functional Tester with Rational Quality manager. Can anyone provide the details steps giving explaination with examples.
In selenium testing how to connect with database , any one pls give the entire information
Hi, Can anyone please tell me which Test Automation tool can be used for : 1. Web based testing 2. .Net (C#) applications 3. Mobile applications (PDA)
Tell me what is the testng.xml file used for?
On what factors can you map the success of automation testing?
List some advantages and disadvantages of automation testing.
Tell me how a text written in a text field could be cleared?
What is functional and regression testing?