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
Calculate difference between 2 date / times in oracle sql?
What is blob data type in oracle?
What is dynamic proxy?
State the difference between a primary key and foreign key?
What privilege is needed for a user to delete rows from tables in another schema?
Is oracle a language?
Is the After report trigger fired if the report execution fails ?
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?
How to download oracle database 10g xe?
What are the execution control statements?
Explain the use of indexes option in exp command.
Explain oracle insert into command?
Is oracle the best database?
How to get maxsal , minsal, ename department wise in single query
How to use in conditions in oracle?