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 / mohan
SELECT dno,sal
FROM EMP
WHERE sal>ANY(SELECT AVG(sal)
FROM emp
GROUP BY dno)
ORDER BY dno;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is a common use of group by in sql?
How to load data with sql*loader?
Why is normalization important?
How to create an array in pl/sql?
What do you mean by field in sql?
What is the difference between sql and t sql?
Advantages and disadvantages of stored procedure?
Write a query to find the names of users that begin with "um" in sql?
What is constant in pl sql?
What is the difference between the conventional and direct path loads? : aql loader
What is trigger point?
What is the purpose of design view?
Explain the difference in execution of triggers and stored procedures?
how to use case expression? : Sql dba
how to decrement dates by 1 in mysql? : Sql dba