i have a table
eno dno sal
1 10 200
2 10 150
3 10 100
4 20 75
5 20 100
i want to get sal which is less than the avg sal of thri dept.
eno dno sal
2 10 150
3 10 100
4 20 75
Answers were Sorted based on User's Feedback
Answer / parth
select salary from eno where salary<(select avg(salary)
from eno ) and rownum < 6
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / vin
select * from emp group by deptno having sal < avg(sal)
Is This Answer Correct ? | 0 Yes | 3 No |
suppose I have two table one Emp and other is dpt. Emp table has a field ,dept id,name ,sal and dpt table has a field dept id,dept name. Now I want to find out the emplyee list whose sal is between 2000-3000 from dept x.
7 Answers Geometric Software, IBM,
What is hibernate and its relation to sql?
Is microsoft sql free?
If i insert record in table A and these record should update in table B by using Trigger.How to achieve this.
What is Referential Integrity?
What is native sql query?
what is difference between decode and case function?
what is the difference between union and union all? : Sql dba
How do you determine the current isolation level? : Transact sql
What is materialised View?
What is the difference between left join and left outer join?
What are the types of keys?