In SQL 2012, 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 and ID into one row while summing the sales column of these selected rows into the merged row. For example:

state month ID salesFL June 0001 12,000FL June 0001 6,000FL June 0001 3,000FL July 0001 6,000FL July 0001 4,000 TX January 0050 1,000MI April 0032 5,000MI April 0032 8,000CA April 0032 2,000This what I am supposed to get

state month ID salesFL June 0001 21,000FL July 0001 10,000 TX January 0050 1,000MI April 0032 13,000CA April 0032 2,000I did some research, and I found that the self join is supposed to do something similar to what I am supposed to get. Any help would be greatly appreciated. Thank you!