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
Explain how to use transactions efficiently : transact sql
What are tables in sql?
How many types of cursors are available in pl/sql?
how many tables will create when we create table, what are they? : Sql dba
How to use sql*plus built-in timers?
How do I count rows in sql query?
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
How would you pass hints to the sql processor?
How to set up sql*plus output format in oracle?
who introduced sql?
How to run sql*plus commands in sql developer?
What does pragma mean?
Is sqlexception checked or unchecked?
Why do we need view in sql?
How would you convert date into julian date format?