The SUM() without the GROUP BY is a SUM() of the entire table - but limited by the WHERE clause.

The SUM() with a GROUP BY gives a different SUM() for each row - a SUM() related to the GROUP BY fields.

So I do not understand how you can be doing both - or even trying to do both.