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

Can we insert delete data in view?

950


What is the difference between truncate and drop statements?

1186


Can we join two tables without common column?

1001


What is an example of translating a date into julian format?

1117


Is sql a microsoft product?

951


What is sql*loader?

1188


Show the cursor attributes of pl/sql.

1048


What is full join in sql?

991


What is the difference between unique and primary key constraints?

1071


how is myisam table stored? : Sql dba

1054


how to add a new column to an existing table in mysql? : Sql dba

1071


What is a record in a database?

1062


What is the most restrictive isolation level? : Transact sql

1083


What information is needed to connect sql*plus an oracle server?

1028


Why we use joins in sql?

981