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 / vin
select * from emp group by deptno having sal < avg(sal)
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What are primary key and foreign key and how they work?
what is rdbms? : Sql dba
What is embedded sql with example?
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
How do I access sql anywhere database?
what is bdb (berkeleydb)? : Sql dba
how to present a past time in hours, minutes and seconds? : Sql dba
what are date and time intervals? : Sql dba
Why is sharding used?
What are different clauses used in sql?
Can we call dml statement in function?
What are variables in pl sql?
What is the advantage of index in sql?
what is try_catch block in procedure
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba