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
Are stored procedures faster than dynamic sql?
What is the command used to fetch first 5 characters of the string?
how to check server status with 'mysqladmin'? : Sql dba
what is oracle database ? : Sql dba
How to write a query to show the details of a student from students table whose
what is the difference between myisam static and myisam dynamic? : Sql dba
Can variables be used in sql statements?
what is the stuff function and how does it differ from the replace function? : Sql dba
What does seeding a database mean?
What do you mean by stored procedures? How do we use it?
What is primary key sql?
Why use subqueries instead of joins?
Is truncate ddl or dml?
What is an exception in pl/sql?
Write a unique difference between a function and a stored procedure.