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

select * from emp where sal<(select avg(sal) from emp where
eno in(2,3,4))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the benefits of triggers?

1123


What is the basic form of sql query?

881


How can you know that statistics should be updated?

1028


what is the difference between sql and t-sql? : Transact sql

1044


What is the usage of the distinct keyword?

1169


What is left join example?

891


When to use inner join and left join?

908


What is a sql trace file?

981


How can we link a sql database to an existing android app?

983


What are primary key and foreign key and how they work?

929


What is cursor explain with example?

924


Can we join more than 2 tables in sql?

950


Can we insert in sql function?

1027


Define implicit and explicit cursors.

1078


What will you get by the cursor attribute sql%found?

901