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 / abhishekjaiswal
select department_id,salary from employees e
where salary<(select trunc(avg(salary))
from employees where department_id=e.department_id;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different parts of a package?
Can triggers stop a dml statement from executing on a table?
Which is faster count (*) or count 1?
how can you see all indexes defined for a table? : Sql dba
What is meant by <> in sql?
How do I find duplicates in a single column in sql?
What are the events on which a database trigger can be based?
What is cascade in sql?
how to convert dates to character strings? : Sql dba
What are joins in sql?
What are the string functions in sql?
What is the purpose of a secondary key?
What does sign mean sql?
How do I run a sql query in pgadmin 4?
What is int identity in sql?