Skip to content
Advertisement

Need to create a Totals report from oracle table data

I have a table in oracle similar to the the example table image that I need to have output the segregated totals as shown in the second example results image. I need the sums of each item_type where A & B are just examples for a large number of possible items that can be added.

example table:

enter image description here

example results:

enter image description here

Any help would be appreciated. thanks

Advertisement

Answer

Use conditional aggregation:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement