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 / madhu
select * from emp where sal<(select avg(sal) from emp where
eno in(2,3,4))
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to do backup entire database? : Transact sql
How to convert comma separated string to array in pl/sql?
How much does a sql dba make? : SQL DBA
What is sql trigger example?
Is postgresql a server?
what is bcp? When is it used?
What is offset in sql query?
Can a varchar be a primary key?
Which is faster count (*) or count 1?
what is the functionality of the function htmlentities? : Sql dba
Is left join faster than inner join?
Can we perform dml in function?
What problem one might face while writing log information to a data-base table in pl/sql?
Write the alter statement to enable all the triggers on the t.students table.
What is the difference between null value, zero, and blank space?