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

select * from emp e where sal<
(select avg(sal) from emp where deptno=e.deptno)
order by deptno

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I truncate a word?

1163


What is a database? Explain

1179


what is a materialized view? : Sql dba

1133


What is trigger in sql?

1156


What is user in sql?

1078


What is data manipulation language?

1234


What is foreign key sql?

1041


What are views in sql?

1037


How to install oracle sql developer?

1098


Is grant a ddl statement?

945


What is an exception in PL/SQL? What are the two types of exceptions?

1402


What are the various levels of constraints?

1170


Can we debug stored procedure?

1069


What does varchar include?

995


What are the advantages of normalization?

1130