Sum two rows in one - My Sql
Posted
by
user303832
on Stack Overflow
See other posts from Stack Overflow
or by user303832
Published on 2012-06-07T10:28:08Z
Indexed on
2012/06/07
10:41 UTC
Read the original article
Hit count: 196
I have found some similar posts, but I didn't find them useful. But I didn't know how to group them.
I would like to Sum 'No' and 'Not Set' to one row, and to lose 'Not Set' row.
So : 'No' = 'No' + 'Not Set'
I have something like this :
TEST TestCount Month
'Yes' 123 March
'No' 432 March
'Not Set' 645 March
'Yes' 13 April
'No' 42 April
'Not Set' 45 April
'Yes' 133 May
'No' 41 May
'Not Set' 35 May
....
And I would like something like this :
TEST TestCount Month
'Yes' 423 March
'No' 410 March
'Yes' 154 April
'No' 192 April
'Yes' 130 May
'No' 149 May
....
Can anybody help me with this, tnx in advance
© Stack Overflow or respective owner