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 |
What is oracle instant client?
How to execute a stored procedure in oracle?
What is an oracle tablespace?
query to find the maximum no persons with same age(age colomn) from emp table
What are steps required to ENTER DATA INTO DWH?
defination of bitmap index
hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.
Which is better Oracle or MS SQL? Why?
How to check database size in Oracle?
When do we use group by clause in a sql query?
what is mean by prmary key and foreign key and how can we diffrentiate that? Please answer me. Advance thanks.
What is the usage of control file in oracle?