how to get top two salaries from employee tables
Answers were Sorted based on User's Feedback
Answer / rituparna
select salary from (select salary from emp order by salary
desc)
where rownum < 3;
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / maruti
select max(sal)
from emp
where sal < (select max(sal) from emp);
with this query u ll get second largest sal of that table
if u want to know max (sal) then it ll be...
select Max(sal)
from emp;
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / varu
This will be right answer for the query
Select * from empsal e where 2<=(select count(*) from empsal f
where e.sal>f.sal) order by sal desc
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / charan
hi this is charan,
select e1 *from employees e1
where 2>
( select column(distincte2.sal)
where e2.sal>e1.sal )
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / shiva - e-softsys
SELECT MIN (SALARY) FROM EMP WHERE
SALARY IN (SELECT DISTINCT TOP 2 SALARY FROM EMP ORDER BY
SALARY DESC)
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / rajendra prasad reddy penumall
this is a SQL query
SELECT DISTINCT salary FROM employee WHERE(max(salary))
| Is This Answer Correct ? | 3 Yes | 3 No |
Answer / sivaprasad
SELECT MIN(SALARY) FROM EMP WHERE SALIN(DISTINCT TOP2
SALARY FROM EMP ORDER BY SALARY DESC.
OR
SELECT TOP 2 SALARY FROM EMP ORDER BY SALARY DESC.
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / varu
writing this way is also correct
select sal
from empsal
where id > 2
order by sal desc
| Is This Answer Correct ? | 0 Yes | 0 No |
when will do the beta test? when will do the alpha test?
Hi Friends, I wish to start my career in manual Testing as I believe I am ready to face Interviews.I have good domain knowledge in banking(investment and retail) and insurance.To be in the competition I have added three years of testing experience to my CV apart from my domain experience. Can someone please advice some real time tips which can help in facing the interview. Thanks in advance
What are Test Deliverables?
At what stage unit testing has to be done?
Can the system testing be done at any stage?
What types of code coverage do you know?
if tester invloves in req or initial phase , what test eng will do in initial phase?
How do You Test Application with having any requirement and Document?
2 Answers Digital Group, Keystone, Wipro,
What are the qualities needed by a software tester?
give me atleast 10 cases for GOOGLE search engine?
How to write gui test cases ? plz gve me some sugessition about gui test cases along with examples plz plz any one plz
Hi everyone, My name is Salil Mishra. I am having 1.7 years of experience in manual testing. But as i m 2008 passout, there are limited position for me in the companies. Please help me out in getting a good job guys..I f you find something then please mail me at salilmishra29@gmail.com