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

how many ways to get the current time? : Sql dba

1048


What is the default isolation level in sql server? : Transact sql

1088


what are the different tables present in mysql? : Sql dba

1042


How do you optimize a stored procedure in sql?

1018


How do I edit a trigger in sql developer?

1053


what are different types of keys in sql?

1220


When is the explicit cursor used ?

1090


How to display the current date in sql?

1129


How do I start sql from command line?

1081


What found sql?

995


How to fetch alternate records from a table?

1305


What is a boolean in sql?

1025


Is sql free?

1027


Does group by remove duplicates?

1092


what is single byte over head in oracle..?

2457