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 |
Please help me how to write a Query to change the primary key constraint from 1 attribute to another attribute in a table
What are the limitations oracle database 10g xe?
What is a Database instance ? Explain?
What are the database administrators utilities available?
Can we create index on views?
19 Answers CTS, Syntel, TCS,
Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?
List the types of joins used in writing subqueries?
i can create a view with two columns from emp table,, later i need to add one more emp column to existing view.. what is query similarly add one more column to existing primary key constraint.. please give me the solutions
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process
what are the advantages of running a database in NO archive log mode?
"primary key=unique+null" is equal,reson?not,reason?
please explain.. DB architecture ...