Write a query to find second highest salary of an employee.
Answer Posted / prashant srivastava
**Exact answer to the question**
SELECT MIN(e1.Salary) FROM emp e1 WHERE e1.Salary IN
(Select e2.Salary from emp e2 ORDER BY e2.Salary DESC FETCH
FIRST 2 ROWS ONLY)
**Generic Solution**
SELECT MIN(e1.Salary) FROM emp e1 WHERE e1.Salary IN
(Select e2.Salary from emp e2 ORDER BY e2.Salary DESC FETCH
FIRST n ROWS ONLY)
Just replace n as the asked rank of the salary. For instance
If 29th highest salary is asked then replace n with 29..
simple...isn't it? :):)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Hi All, Is there any free automation tool for windows application and it's easy to use? I usually take a lot of time to regression test my application when there is a new build on live environments (about same 10 environments) I wish I know a automation tool to regression test and ofcourse it's free, easy to use (maybe using C#) Could anybody can advise to me a tool like that? I very appreciate ^^
How to check if an element is visible on the page?
Does every software project need testers?
What is ‘good code’? What is ‘good design’?
What is the Differnce between Client/Server Testing and Web Based Testing?
How can the user get a text of a web element?
Define sdlc in testing.
What are the main differences between Loadrunner and QTP tools? Describe briefly a "real world" scenario that would make you use the first one versus the other? Thank you for your answers....
Tell me what is automation testing?
What is test tool?
wat would be the parameteries for ul testing for web applilcation
Hi everyone, Are you looking for "worksoft certify" automation tool training online? We have experienced corporate Worksoft certify trainers. We also provide support Worksoft certify automation issues. Please contact us Automationsolutions@yahoo.com
Tell me what databases can test director reside on?
Please explain what is the difference between findelement () and findelements ()?
List out some of the automation tools which could be integrated with selenium to achieve continuous testing.