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 are the different types of cursors? explain?
Explain the features of oracle?
What is the oracle implicit cursor?
What is the function of Optimizer ?
What is a public synonym?
5. Display full details from the ORDER_LINE table where the item number is (first condition) between 1 and 200 (no > or < operators) OR the item number is greater than 1000 AND (second condition) the item cost is not in the list 1000, 2000, 3000 OR the order number is not equal to 1000.
How to make a Data Backup in oracle ? What is the procedure for creating the dump files in oracle ( any version ) ?
What is SAVE POINT ?
What is a connect identifier?
What SQL query from v$session can you run to show how many sessions are logged in as a particular user account?
What are the factors that affect OPTIMIZER in choosing an Optimization approach ?
Will you be able to store pictures in the database?explain.