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 / vin
select * from emp group by deptno having sal < avg(sal)
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
what is subquery? : Sql dba
Can we use ddl statements in stored procedure?
Explain architecture of sql server notification services?
What is $$ in sql?
Define implicit and explicit cursors.
What is trigger explain it?
What is where clause in sql?
What is transaction control language (tcl)?
What is scalar function in sql?
what is a database lock ? : Sql dba
What are the different types of dbms?
what does the t-sql command ident_current does? : Transact sql
what are the differences among rownum, rank and dense_rank? : Sql dba
Why we use triggers in mysql?
What does truncate mean in sql?