title: Oracle - How to sum related items?
body: <p>I have a set of data I am wanting to report on (in Oracle 12c).  I am wanting to show the sum of certain groupings, based on the value of the 'ITEM' column.  If ITEM = ('A', 'B' or 'C'), then they get "grouped" together and the values for columns Cost1 and Cost2 are summed up. This is called "Group1".  Group2 contains ITEMSs ('D, E, F').  There are only 6 groupings, made up of around 13 static/fixed items. I know exactly what the items are in each grouping.</p>
  
  <p>Here is a set of sample data, with borders showing what should be grouped together.  The 2nd listing shows what the output should look like.  I think i am wanting to sum within a case statement, but I just can't seem to wrap my head around it...</p>
  
  <p><a href="https://i.stack.imgur.com/F7CXK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F7CXK.jpg" alt="Grouping output"></a></p>