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 |
Shall I get Pro*C Compiler in Oracle-10g release ?
What is a proxy class?
How do I manually uninstall oracle client?
How to update rows in table, suppose i have lacks of rows in table how to update total table with update statement. Can u please any one answer this question with update statement.
How to use attributes of the implicit cursor in oracle?
How to Identify the previously inserted/updated records in already populated table.
How to start an oracle instance?
why you need store procedure ? where do we use it in a Java project? can you get the code for as store procedure using in Java?
What is the purpose of init.ora. ? how many init.ora exist in oracle installation? suppose there are 3 database on one oracle server, how many init.ora do I have? what are various database objects? how will you identify memmory related performace issue in oralce? any idea about basic architure difference of oracle and db2? comment on which is better , with reasons? what is a fuction based index? is it recommended to use the same. ? what is global temporay table? what is teh signification of the parameter session_cached_cursor ?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
How to use "if" statements on multiple conditions?
what is difference between foreign key and reference key