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.
Answer Posted / 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 |
Post New Answer View All Answers
How to write text literals in oracle?
What is a data dictionary and how can it be created?
Why is oracle used?
What are named parameters?
How to select an oracle system id (sid)?
How to shutdown your 10g xe server?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
How to do paging with oracle?
Can you have more than one content canvas view attached with a window ?
How to empty your oracle recycle bin?
How to write a query with a right outer join in oracle?
How do you get nicely formatted results from an oracle procedure that returns a reference cursor?
How to build data dictionary view an new database?
How do we display rows from the table without duplicates?
What are the different types of database objects?