I have a table with two columns. The items in the first column represent one of four categories, and the items in the second column represent the data referenced by their copy of the category:
CategoryA : 2
CategoryC : 1
CategoryB : 4
CategoryB : -1
CategoryD : 2
CategoryC : 1
and etc.
I need to build a SQL query that will return Sum for each of these categories, e.g.
CategoryA : 2
CategoryB : 3
CategoryC : 2
CategoryD : 2
source
share