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
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 |
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 |
Can we create index on views?
19 Answers CTS, Syntel, TCS,
What is a Public Synonyms ?
what are the advantages of running a database in archive log mode?
How many memory layers are in the shared pool?
what diffrence between function and procedure?
What is bulk copy or bcp in oracle?
What are the system predefined user roles?
Which Department has MOST NUMBER of employees?
8 Answers IBM, LeadSquared, Mastek,
What are Schema Objects ?
you are sorting a table using "order by"(descending) clause of a column which contains a null value...whether that row containing null value will come first or last in the output??
What are the advantages of Views ?
What is a recycle bin in oracle?