Code
SELECT BK.CATEGORY, NVL(BK.TITLE,'===Sum of category===') AS TITLE,
NVL(TO_CHAR(SUM(OI.PAIDEACH),'$9999.99'),'-none-') AS SALES,
NVL(SUM(OI.QUANTITY),0) AS QTY
FROM books bk LEFT OUTER JOIN orderitems oi
ON (bk.isbn = oi.isbn)
GROUP BY CATEGORY, ROLLUP(title)
ORDER BY CATEGORY;
Hopefully this makes sense - but looking to have at the bottom of the results display a 'grand total' of sales as well as 'grand total' of qty of books sold
I was able to get all the data besides that to show -- not sure how -- what am i missing?