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
Answer Posted / ajit
select eno, dno, sal
from test
group by eno, dno, sal
having sal <any ( select avg(sal) from test )
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is exit statement?
what is text? : Sql dba
Is sql a dbms?
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
What are the operators in sql?
How do you add a column to a table?
Does postgresql run on the cloud?
What is dynamic query?
What is sql performance tuning?
How to run sql functions in pl/sql?
Explain the uses of control file.
Where is sql database stored?
what is primary key? : Sql dba
what are the differences between char and varchar? : Sql dba