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 are the benefits of triggers?
What is the basic form of sql query?
How can you know that statistics should be updated?
what is the difference between sql and t-sql? : Transact sql
What is the usage of the distinct keyword?
What is left join example?
When to use inner join and left join?
What is a sql trace file?
How can we link a sql database to an existing android app?
What are primary key and foreign key and how they work?
What is cursor explain with example?
Can we join more than 2 tables in sql?
Can we insert in sql function?
Define implicit and explicit cursors.
What will you get by the cursor attribute sql%found?