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

Does oracle roll back the transaction on an error?

1017


what are the properties and different types of sub-queries? : Sql dba

1034


describe mysql connection using mysql binary. : Sql dba

1071


Are left and right joins the same?

1088


what is oltp (online transaction processing)? : Sql dba

1080


How does rowid help in running a query faster?

1417


Why do we need unique key in a table?

960


What do you mean by stored procedures?

1014


Explain ttitle and btitle.

1123


Do we need commit after truncate?

1087


What is the plv (pl/vision) package offers?

1054


What is the starting oracle error number?

1058


Which is faster truncate or drop?

1045


What is primary key and unique key?

1121


How many types of triggers are there in pl sql?

1069