Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

select * from emp where sal<(select avg(sal) from emp where
eno in(2,3,4))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to do backup entire database? : Transact sql

1197


How to convert comma separated string to array in pl/sql?

1242


How much does a sql dba make? : SQL DBA

993


What is sql trigger example?

1115


Is postgresql a server?

1114


what is bcp? When is it used?

1182


What is offset in sql query?

1179


Can a varchar be a primary key?

1049


Which is faster count (*) or count 1?

1093


what is the functionality of the function htmlentities? : Sql dba

1012


Is left join faster than inner join?

1172


Can we perform dml in function?

1137


What problem one might face while writing log information to a data-base table in pl/sql?

1250


Write the alter statement to enable all the triggers on the t.students table.

1178


What is the difference between null value, zero, and blank space?

1257