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 |
How do we find Pass and Fail percentage of Test Cases in Real Time. Anybody can explain it in Detail..Thanks is advance....
Need some 10 test scenarios for integration testing on Gmail.
What is comprehensive testing
what is validation testing.
Describe to me the Software Development Life Cycle as you would define it.
Where are more than 50% of the defects introduced
Hi I am B.tech graduate.Right now i am working sutherland as a technical support exce.I have completed CSTP certification in STC .I got a opportunity from STC third eye.. They asked me to pay 50,000 and they will give training and also they will give job with 5000 salary.. I dont know which option is best for me, since i am fresher for this software industry.. I have a dilemma,since its little bit risky option... shall I choose this optionplz give me some suggestion...
when there are any CRs in the projects, as a tester what do you do?
What is Testing Life Cycle. Explain Briefly?
Difference btween the QA and QC?
From what phase of project, testing will starts, what tester will do at starting stage?
Difference between web application and Client Server application ?