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

What are the types of join and explain each?

989


What is sql profiler in oracle?

1017


What is the usage of sql functions?

1084


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

1068


What are stuff and replace function?

1019


What is pl sql code?

995


What is the use of function in sql?

1030


Is coalesce faster than isnull?

911


What is the usage of when clause in trigger?

993


Is ms sql traffic encrypted?

876


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.

2024


What is sqlcontext?

993


what is user defined functions? : Sql dba

978


What are the benefits of triggers?

1123


what are numeric data types? : Sql dba

1004