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.

Answers were Sorted based on User's Feedback



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

Answer / sarath

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

Is This Answer Correct ?    2 Yes 1 No

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

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

More Oracle General Interview Questions

Can I create users through internet explorer in oracle 10g?

0 Answers   MCN Solutions,


What are nested tables?

0 Answers  


What are data pump export and import modes?

0 Answers  


pls explain connect by prior with example and its real time use

3 Answers  


What is a nested table?

0 Answers  


What is forall Statement ?

2 Answers   Thermotech,


How to restrict the duplicate records in table valuesets

2 Answers   IBM,


How to pass parameters to procedures?

0 Answers  


What are Clusters ?

5 Answers   Amdocs, Infosys,


Give the different types of rollback segments.

0 Answers  


What does ROLLBACK do ?

1 Answers  


What is catalog in Oracle?

0 Answers   MCN Solutions,


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)