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 do I send sql query results to excel?
How many types of triggers exist in pl/sql?
What is the location of pre_defined_functions.
What is #table in sql?
Write an sql query to select all records from the table?
Why do we need a foreign key?
What is pls integer?
What are sql functions? Describe the different types of sql functions?
What is the difference between sql, mysql and sql server?
What is the difference between mdf and ndf files?
Why self join is used in sql?
Define commit?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
What is the difference between left and left outer join?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba