php - Sum of the columns mysql -



php - Sum of the columns mysql -

this question has reply here:

sum 2 columns in 2 mysql tables 2 answers

i have situation this:

- name value ------------- - stuff_1 2 - stuff2 5 - stuff2 3 - stuff_1 4

which mysql query have utilize in order sum these values , this:

- name value ------------- - stuff_1 2+4=6 - stuff2 5+3=8

you need this:

select name, sum(value) table_name grouping name

take @ mysql group by , aggregation functions listed there

php mysql sum

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -