I have one table with the following data:
Table 1:
CUSIP DESC QUANTITY
1 ABC 300
1 ABC 400
1 ABC 500
I want to move this data into Table 2 but add the quantity if the cusip, and desc are the same
Table 2:
CUSIP DESC QUANTITY
1 ABC 1200
GROUP BYyour columns andSUMthe QUANTITY:Here’s a demo: http://sqlfiddle.com/#!3/c2620/1/0