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
Explain the difference between replace() and translate() functions in oracle?
What does sharding mean?
How to empty your oracle recycle bin?
How do I escape a reserved word in oracle?
How to select some rows from a table in oracle?
What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?
How to define and use table alias names in oracle?
What do you mean by a deadlock?
What is the usage of control file in oracle?
Give the different types of rollback segments.
IS it possible to built the oracle database without setting the kernal parameters?
How to write text literals in oracle?
How many types of synonyms in Oracle?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables