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 / prasant
select sal from demo where sal<(select avg(sal) from demo
where eno in (2,3,4));
NOTE:first create table demo and insert all these 5 rows
then run querry.
If any issue call me(PRASANT)
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
What is pl sql package?
What does plv msg allows you to do?
What are tables in sql?
What is the difference between partition and index?
Explain the commit statement.
What is the purpose of my sql?
Does google use sql?
What is user in sql?
Can you skip header records while loading? : aql loader
What is sharding in sql?
what is a field in a database ? : Sql dba
What is a schema sql?
Which command is used to delete a trigger?
Can primary key be changed?
What is a record in a database?