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
Is sql developer case sensitive?
what is a trigger in mysql? Define different types of trigger. : Sql dba
tell us something about heap tables. : Sql dba
Why we use triggers in mysql?
Does postgresql run on the cloud?
What is cartesian join in sql?
What is a native sql query?
How do you identify a primary key?
What are the methods of filing?
what is the difference between join and union? : Sql dba
what is online transaction processing (oltp)? : Sql dba
What is group by in sql?
Show how functions and procedures are called in a pl/sql block.
What is data definition language?
What does the hierarchical profiler does?