2. Display the item number and total cost for each order
line (total cost = no of items X item cost). Name the
calculated column TOTAL COST.
Answers were Sorted based on User's Feedback
Answer / girija.112
ANS:
SELECT ITEM_NO , NO_OF_ITEMS*INDIVIDUAL_ITEM_COST AS "TOTAL COST"
FROM ITEM_TABLE
ITEM_NO TOTAL COST
1001 30000
1002 40000
1003 72000
1004 100000
1006 40000
1007 60000
1008 80000
1009 -
1010 56000
I have assumed that ITEM_NO, NO_OF_ITEMS &
INDIVIDUAL_ITEM_COST columns are in a single table ITEM_TABLE
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ajit
select itemnum,totalcost
from <tab name>
group by cube(itemnum, totalcost);
Is This Answer Correct ? | 0 Yes | 0 No |
How to create a new view in oracle?
What is the difference between hot backup and cold backup in oracle?
sql query to get zero records from a table
which is the best training centre for learning oracle?
What is a view and how is it different from a table?
What is the scope of a local variable?
Can you assign multiple query result rows to a variable?
What is save point in oracle database?
How to rename an existing table?
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
What is a initialization parameter file in oracle?
What is a system tablespace?