i have a table like below
name1 | name2 | amount1 | amount2 |
aa | 111 | 100 | 200 |
aa | 111 | 200 | 300 |
aa | 111 | 0 | 100 |
aa | 111 | 250 | 350 |
bb | 222 | 150 | 0 |
bb | 222 | 300 | 400 |
cc | 333 | 0 | 200 |
cc | 333 | 350 | 0 |
here the name aa is repeated also 111 but the amounts are not repeated it is different
i want the repetative names as one record and the amount should be the sum
for eg i want the above table as the below table
name1 | name2 | amount1 | amount2 |
aa | 111 | 550 | 950 |
bb | 222 | 450 | 400 |
cc | 33 | 350 | 200 |