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...

24. Display the order number for all orders whose average
item cost is greater than the overall average item cost
across all orders.

Answer Posted / sarath

Small correction to the above answer. Its not MAX, but AVG
Sorry for the mistake

select ORDER_NO,AVG(ITEM_COST) from <TN>
Group by ORDER_NO
having AVG(ITEM_COST) > (Select AVG(AVG(ITEM_COST)) from
<TN> Group by ORDER_NO)

This is to display the Order no whose AVG is > Resultant AVG of All Order's AVG(ITEM _Cost)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Calculate difference between 2 date / times in oracle sql?

1044


What is blob data type in oracle?

1125


What is dynamic proxy?

1012


State the difference between a primary key and foreign key?

941


What privilege is needed for a user to delete rows from tables in another schema?

1071


Is oracle a language?

953


Is the After report trigger fired if the report execution fails ?

2917


How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?

2829


How to download oracle database 10g xe?

1018


What are the execution control statements?

1071


Explain the use of indexes option in exp command.

1153


Explain oracle insert into command?

1115


Is oracle the best database?

970


How to get maxsal , minsal, ename department wise in single query

1551


How to use in conditions in oracle?

1058