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 is sql partition function?
how to shutdown mysql server? : Sql dba
Why function is used in sql?
What is a composite primary key?
What is a common use of group by in sql?
what is union? : Sql dba
What is varchar sql?
how to create a new table in mysql? : Sql dba
how many sql ddl commands are supported by 'mysql'? : Sql dba
What does dml mean?
What is latest version of sql?
What is pivot in sql?
how to include numeric values in sql statements? : Sql dba
What are the advantages of pl sql over sql?
What does the acronym acid stand for in database management?