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

What is the Tune Query

1859


How to create a single index for multiple columns?

574


What is dynamic proxy?

564


For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

1568


What are the database administrators utilities available?

590






How to drop a stored function?

688


How to connect to a remote server?

573


What is partitioned table in Oracle?

652


What are the uses of a database trigger?

530


What is set verify off in oracle?

597


How to invoke the data pump import utility?

657


What is a cursor and what are the steps need to be taken?

605


What is an oracle user account?

597


How to get a list of all user accounts in the database?

632


How to do paging with oracle?

586