How can i query and return all the rows but with "SUM" added to my query?
Here is my sample query:
select SUM(amount) as total, user_id, username, from table where user_cat = '1';
if I remove SUM
, I get the correct number of rows returned, but when I add SUM
, the row result is decreased.
Any Idea how to do this?
COUNT
and notSUM
– Fred -ii- Aug 2 '14 at 17:41