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 is a record in a database ? : Sql dba
difference between anonymous blocks and sub-programs.
what are rollup and cube in t-sql? : Transact sql
What's the difference between inner join and left join?
What is set transaction?
What are all different types of collation sensitivity?
What is an intersect?
What are synonyms in sql?
What are database links used for?
What is memory optimized table?
What does subquery mean in sql?
how do you know the version of your mysql server? : Sql dba
What does rownum mean in sql?
What is procedure function?
What normalization means?