I have a table in Postgres 9.3.6 that looks like this:
utm_source    value
fb            12
fb            8
google        3
google        4
null          5
I want to run a SQL query to sum value by utm_source, but also include the total value as well. So the final table should look like:
utm_source    sum
fb            20
google        7
null          5
all           32
This is what I'd otherwise use:
SELECT SUM(value) as sum FROM my_table GROUP BY utm_source;
But I want the all in there as well!
 
     
     
     
    