SUM without Group By - newbie
718446Aug 20 2009 — edited Aug 20 2009I have the following query. The results are below
SELECT CODE, Sum((PURCHASE_QUANTITY * UNIT_COST)*(SPLIT_PERCENT/100))AS TOTAL, ITEM_DESC
FROM CAPITAL
INNER JOIN SPLIT ON (OUTLAY.ELEMENT = SPLIT.ELEMENT)
GROUP BY OUTLAY.CODE, ITEM_DESC
60 97 desc1
60 82 desc2
60 47 desc3
60 12 desc4
61 10 desc5
61 58 desc6
62 14 desc7
62 80 desc8
What I want is
60 123 desc1
61 13245 desc2
62 1234 desc3
Adding the description to the group by is not allowing the totals to rollup but instead is showing the detailed cost per code. Is there a way around this?