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
How to load data from external tables to regular tables?
Explain what are clusters?
How to generate query output in html format?
What is the data pump import utility?
When do I need to use a semicolon vs a slash in oracle sql?
What are the parameters that we can pass through a stored procedure?
What are the uses of a database trigger?
What is an oracle user account?
Explain the types of exception?
Can we store images in oracle database?
How will you identify oracle database software release?
What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?
How to drop an existing table in oracle?
Explain rename?
An automatic job running via DBMS_JOB has failedKnowing only that its failed, how do you approach troubleshooting this issue?