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

select eno, dno, sal
from test
group by eno, dno, sal
having sal <any ( select avg(sal) from test )

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the methods used to protect source code of pl/sql.

965


What are the parts of a basic sql query?

920


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3010


Explain the insert into statements in sql?

939


What is the difference between explicit and implicit cursors in oracle?

999


What are views in sql?

928


What are procedures used for?

924


How many clustered indexes can you have?

926


what is meant by urlencode and urldocode? : Sql dba

1092


How do you optimize a query?

941


What is scalar and vector?

939


What does the argument [or replace] do?

1017


Is there a way to automate sql execution from the command-line, batch job or shell script?

919


What is assignment operator in pl sql?

970


What is the purpose of my sql?

902