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 |
Q) How to Find Max Date from each Group? (Asked in Infosys (INFI)Interview)
Can multiple columns be used in group by in oracle?
What is meant by recursive hints in oracle?
Which is better Oracle or MS SQL? Why?
What is merge in oracle?
How to use regular expression in pattern match conditions in oracle?
Explain what are the type of synonyms?
How to export data with a field delimiter?
What are triggers?Where are they used?
what are pseudocolumns?
11. Display the client number and name and the client number and name of the person who referred that client.
Explain what are the uses of rollback segment?