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
What is an exception in pl/sql?
What is the use of partition by in sql?
Is it mandatory for the primary key to be given a value when a new record is inserted?
What are primary key and foreign key and how they work?
What is sql trigger example?
Do ddl statements need commit?
Explain locks? : Transact sql
Which one is better subquery or joins?
what is acid property in database? : Sql dba
what are local and global variables and their differences? : Sql dba
What is union, minus and interact commands?
What is server name sql?
Why are indexes and views important to an organization?
Is pl sql better than sql?
Explain character-manipulation functions?