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

what is subquery? : Sql dba

1143


Can we use ddl statements in stored procedure?

1162


Explain architecture of sql server notification services?

1070


What is $$ in sql?

1004


Define implicit and explicit cursors.

1150


What is trigger explain it?

1022


What is where clause in sql?

1052


What is transaction control language (tcl)?

1149


What is scalar function in sql?

1052


what is a database lock ? : Sql dba

1183


What are the different types of dbms?

1023


what does the t-sql command ident_current does? : Transact sql

990


what are the differences among rownum, rank and dense_rank? : Sql dba

1048


Why we use triggers in mysql?

998


What does truncate mean in sql?

1040