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 / prasant

select sal from demo where sal<(select avg(sal) from demo
where eno in (2,3,4));

NOTE:first create table demo and insert all these 5 rows
then run querry.
If any issue call me(PRASANT)

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is set serveroutput on?

655


What is full join in sql?

532


What are data types in pl sql?

570


What does pragma mean?

517


How do you modify a trigger?

535






Are sql database names case sensitive?

511


What are triggers and its types?

564


What is rownum?

546


What is rowtype?

576


Can dml statements be used in pl/sql?

589


What is a relationship and what are they?

588


Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)?

3116


Why we use cross join?

547


What is oracle sql developer?

612


What are the three forms of normalization?

545