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
Answers were Sorted based on User's Feedback
Answer / parth
select salary from eno where salary<(select avg(salary)
from eno ) and rownum < 6
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / vin
select * from emp group by deptno having sal < avg(sal)
Is This Answer Correct ? | 0 Yes | 3 No |
What is a data definition language?
What is sql table?
How does index help in query performance?
package specification-3 procedures package body-2 procedures will is execute
Does normalization improve performance?
what is the difference between truncate and delete statement? : Transact sql
What is sql data?
What is serial sql?
What is a full join sql?
how to concatenate two character strings? : Sql dba
How many LONG columns are allowed in a table?
What does the base_object_type column shows in the user.triggers data dictionary view?