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 the difference between myisam static and myisam dynamic? : Sql dba
What are sql ddl commands?
how to start mysql server? : Sql dba
what is 'mysqlcheck'? : Sql dba
Compare sql & pl/sql
What is a sql trace file?
What is rank function in sql?
What is a data definition language?
What is primary key secondary key alternate key candidate key?
What is sql analyzer?
How do I view a sql trace file?
What is synonyms?
What is inner join in sql?
What is data type in database?
What is mdf ldf and ndf?