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 / rutujagabhane
select salary from emp
wher dno in (select dno
from dept
where salary < any
(select avg(salary)
from dept
where dept = 3)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to get help at the sql prompt?
What are all the ddl commands?
What is difference between joins and union?
Which type of cursor is used to execute the dml statement?
What is embedded sql what are its advantages?
what is sql? : Sql dba
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
What is a crud api?
Can you join views in sql?
What is difference between function and trigger?
what is the difference between sql and t-sql? : Transact sql
What problem one might face while writing log information to a data-base table in pl/sql?
What is left join in postgresql?
What is sql lookup?
When sql appeared?