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

select e.eno,e.dno,e.sal
from emp_t e,
(select dno,avg(sal) avgsal from emp_t group by dno) b
where e.sal<b.avgsal and e.dno=b.dno
/

Is This Answer Correct ?    5 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define join and name different types of joins?

1008


Why is sql important?

1109


Does oracle use sql?

931


Do we need to rebuild index after truncate?

1035


Can you call pl/sql package functions from within a fast formula?

1041


Define sql delete statement.

1016


How do you update f as m and m as f from the below table testtable?

1858


Differentiate pl/sql and sql?

1070


How can I tell if sql is running?

1066


What is materialized view. What are different methods of refresh?

1393


what is sql in mysql? : Sql dba

1196


What is difference between group by and partition by?

1062


What is Histogram?

1559


Give the order of sql select?

1137


What is the purpose of my sql?

952