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

How are extents allocated to a segment?

573


How to build data dictionary view an new database?

529


What are the different pseudo commands? Explain in general?

539


Please explain oracle data types with examples?

584


Explain the use of grant option in imp command.

574






What would you do with an in-doubt distributed transaction?

1466


What is the quickest way to fetch the data from a table?

564


How to create a new tablespace in oracle?

556


Oracle

1847


How to invoke the original export import utilities?

503


What is pragma autonomous transaction in oracle?

516


Give syntax for SQL and ORACLE joins.

627


What is oracle sid?

505


How to assign data of the deleted row to variables?

579


Assuming that you are an End User How to find that in the payment Batch some of the Invoice was  Missing To pay How to find That??

1268