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

What is an exception in pl/sql?

1098


What is the use of partition by in sql?

1002


Is it mandatory for the primary key to be given a value when a new record is inserted?

1207


What are primary key and foreign key and how they work?

982


What is sql trigger example?

1075


Do ddl statements need commit?

978


Explain locks? : Transact sql

1012


Which one is better subquery or joins?

1071


what is acid property in database? : Sql dba

1038


what are local and global variables and their differences? : Sql dba

1082


What is union, minus and interact commands?

1307


What is server name sql?

1154


Why are indexes and views important to an organization?

966


Is pl sql better than sql?

1045


Explain character-manipulation functions?

1145