GROUP and ADD

Post here if you need help with SQL.
Post Reply
User avatar
FrederickGeek8
Posts: 148
Joined: Wed Nov 30, 2011 10:31 pm

GROUP and ADD

Post 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]
Post Reply