SUM on values of duplicate row in MYSQL -


i have burning question. running mysql query returns rows duplicate values in it. that's no problem because that's how saved data in past. want label stay same, value (int) must summed. have no clue how this. can me please?

label    |count | _________________ shelves  |15    | pictures |39    | chairs   |19    | tables   |41    | shelves  |49    | cabinets |16    | 

so want count summed in mysl when label duplicate. appreciated!

thanks in advance!

you can use group by sum, e.g.:

select label, sum(`count`) table group label; 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -