I have a table my_table that has columns state, month, ID, and sales.
My goal is to merge different rows that have the same state, month, ID into one row while summing the sales column of these selected rows into the merged row.
For example:
state month ID sales
-------------------------------
FL June 0001 12,000
FL June 0001 6,000
FL June 0001 3,000
FL July 0001 6,000
FL July 0001 4,000
TX January 0050 1,000
MI April 0032 5,000
MI April 0032 8,000
CA April 0032 2,000
This what I am supposed to get
state month ID sales
-------------------------------
FL June 0001 21,000
FL July 0001 10,000
TX January 0050 1,000
CA,MI April 0032 15,000