Group Above Report :
1 - CREATE A GROUP ABOVE REPORT WITH FOLLOWING QUERY : GROUP BY PRODUCT_ID AND ADD FUNCTION TO SHOW PRODUCT_NAME FROM PRODUCT_INFORMATION.
2 - Must have sub total and grand total summary items of the following items:
a) Quantity of Product ID
b) Sum of Unit Price
c) Sum of Quantity
d) Sum of Amount.
SELECT B.PRODUCT_ID,A.ORDER_ID,A.ORDER_DATE,A.ORDER_MODE,A.ORDER_STATUS,B.UNIT_PRICE,B.QUANTITY,B.AMOUNT FROM (SELECT ORDER_ID,ORDER_DATE,ORDER_MODE,ORDER_STATUS FROM ORDERS) A, (SELECT ORDER_ID,PRODUCT_ID,UNIT_PRICE,QUANTITY,NVL(UNIT_PRICE,0)*NVL(QUANTITY,0) AMOUNT FROM ORDER_ITEMS) B WHERE A.ORDER_ID=B.ORDER_ID;
Tags:
Practical