Page 1 of 1

GROUP and ADD

Posted: Mon May 27, 2013 1:33 pm
by FrederickGeek8
Is the anyways for me to group by a certain column and then add the value of another column? In my example code I would like to add the values of `blah_value`
[syntax=sql]SELECT
`blah_value` AS `value`
FROM `blahs`
GROUP BY `blah_name`[/syntax]

EDIT: NVM I figured it out
[syntax=sql]SELECT
SUM(value)
FROM `blahs`
GROUP BY `blah_name`[/syntax]