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 are primary key and foreign key and how they work?

1022


what is rdbms? : Sql dba

1069


What is embedded sql with example?

1099


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

1065


How do I access sql anywhere database?

1024


what is bdb (berkeleydb)? : Sql dba

1093


how to present a past time in hours, minutes and seconds? : Sql dba

1075


what are date and time intervals? : Sql dba

1105


Why is sharding used?

1066


What are different clauses used in sql?

1174


Can we call dml statement in function?

1099


What are variables in pl sql?

1235


What is the advantage of index in sql?

1022


what is try_catch block in procedure

1813


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

1120