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
Can we create view in stored procedure?
How can we avoid duplicating records in a query?
What is sql deadlock?
Can delete statement be rollbacked?
what are rollup and cube in t-sql? : Transact sql
What is a column in a table?
What is the order of sql select?
what are all the different normalizations? : Sql dba
What is Collation Sensitivity ? What are the various type ?
What is normalization in sql?
Can we create a trigger on view?
is it possible to pass an object or table to a procedure as an argument?
What is a table in a database?
What is sqlca in powerbuilder?
Why do we use function in pl sql?