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

select * from emp group by deptno having sal < avg(sal)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a record in a database ? : Sql dba

999


difference between anonymous blocks and sub-programs.

1082


what are rollup and cube in t-sql? : Transact sql

1049


What's the difference between inner join and left join?

949


What is set transaction?

992


What are all different types of collation sensitivity?

978


What is an intersect?

1047


What are synonyms in sql?

932


What are database links used for?

995


What is memory optimized table?

986


What does subquery mean in sql?

994


how do you know the version of your mysql server? : Sql dba

938


What does rownum mean in sql?

953


What is procedure function?

987


What normalization means?

907