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


Please Help Members By Posting Answers For Below Questions

How to write text literals in oracle?

614


What is a data dictionary and how can it be created?

617


Why is oracle used?

557


What are named parameters?

616


How to select an oracle system id (sid)?

591






How to shutdown your 10g xe server?

621


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?

1808


How to do paging with oracle?

576


Can you have more than one content canvas view attached with a window ?

1817


How to empty your oracle recycle bin?

575


How to write a query with a right outer join in oracle?

619


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

556


How to build data dictionary view an new database?

532


How do we display rows from the table without duplicates?

550


What are the different types of database objects?

528