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

select eno, dno, sal
from test
group by eno, dno, sal
having sal <any ( select avg(sal) from test )

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 create view in stored procedure?

973


How can we avoid duplicating records in a query?

983


What is sql deadlock?

1145


Can delete statement be rollbacked?

985


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

1100


What is a column in a table?

1126


What is the order of sql select?

1041


what are all the different normalizations? : Sql dba

1043


What is Collation Sensitivity ? What are the various type ?

952


What is normalization in sql?

1016


Can we create a trigger on view?

897


is it possible to pass an object or table to a procedure as an argument?

1135


What is a table in a database?

1046


What is sqlca in powerbuilder?

1018


Why do we use function in pl sql?

1065