Total Stock (Roll Up)
Hi,
I am trying to display the total stock sold, i want to group by the supplier with roll up.
Sales table includes:
PRODUCT_ID, CUSTOMER_ID, SALES_AMOUNT, QUANTITY, TRANSACTION_DATE, SUPPLIER
SELECT product_id, Sum(quantity) as Units_Sold, vendor
FROM sales
GROUP BY Vendor WITH ROLLUP;
What am i doing wrong?
Subject
Written By
Posted
Total Stock (Roll Up)
April 14, 2018 08:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.