There's my sql data:
code name total
---------------
3 Sprite 2400
17 Coke 1500
6 Dew 1000
17 Coke 3000
6 Dew 2000
But code and name has duplicated values and I want to sum total from each duplicated field. Something like this:
code name total
---------------
3 Sprite 2400
17 Coke 4500
6 Dew 3000
How could I do that in sql?