I have a table like this (using wordpress)
+---------+----------+------------+
| meta_id | meta_key | meta_value |
+---------+----------+------------+
| 1 | views | 3 |
| 2 | blahh | a value |
| 3 | smthn | boo |
| 4 | views | 4 |
| 5 | views | 5 |
| 6 | views | 6 |
| 7 | views | 7 |
| 8 | views | 8 |
+---------+----------+------------+
So I want to SELECT everything WHERE the meta_key = 'views' then take the number from meta_value then add up all those numbers.
I'm not sure if this is possible, if not I could use PHP to add everything up. I thought it would be interesting to know if I can add things in SQL :)