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



2. Display the item number and total cost for each order line (total cost = no of items X item cost..

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

2. Display the item number and total cost for each order line (total cost = no of items X item cost..

Answer / ajit

select itemnum,totalcost
from <tab name>
group by cube(itemnum, totalcost);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

What is oracle and what are its different editions?

0 Answers  


Give the different types of rollback segments.

0 Answers  


what is trigger?

6 Answers   Oracle,


How to create a stored program unit?

0 Answers  


What is MTTR advisor in Oracle?

0 Answers   MCN Solutions,


What is the data pump export utility?

0 Answers  


What is a user role in oracle?

0 Answers  


is there a tool to trace queries, like profiler for sql server?

0 Answers  


What are a cluster and non-cluster index?

0 Answers  


What is a database table in oracle?

0 Answers  


What is the difference between RBBMS & DBMS?

4 Answers  


20. Using a set operator, display the client number of all clients who have never placed an order.

0 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1808)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)