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
how to include character strings in sql statements? : Sql dba
What is group by in sql?
What is the purpose of using pl/sql?
what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba
How to move files from one directory to another in pl sql?
What are the different dml commands in sql?
Explain cursor types?
What is the difference among union, minus and intersect?
Can we call a function containing dml statements in a select query?
What is varchar data type in sql?
What is sqlerrm?
How do we accept inputs from user during runtime?
How do I view output in sql developer?
What has stored procedures in sql?
If the application is running very slow? At what points you need to go about the database in order to improve the performance?