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 / mahalakshmi s
select * from (select id,(case when sal < avg(sal) over(partition by id) then sal else 0 end) avg_val from dept) a where avg_val !=0;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is oracle sql free?
Does sql full backup truncate logs?
Explain what is sql?
What is the starting oracle error number? What is meant by forward declaration in functions?
What are sql constraints?
How to select unique records from a table?
Why do we create stored procedures & functions in pl/sql and how are they different?
What is trigger in pl sql with examples?
What is sorting in sql?
What is sql table?
What is difference between table and view?
What is sql and also describe types of sql statements?
What is a record in a database?
What is a schema sql?
what is collation? : Sql dba