I tried a lot but can´t find the right way. If I select values in Postgres and sum them it looks like this:
SELECT name,sum(size) as total FROM mytable group
If you want all results with the same SELECT, you could do something like
SELECT 'grand total' AS name, sum(size) AS sum FROM mytable UNION ALL SELECT name, sum(size) AS sum FROM mytable GROUP BY name;
Hope it helps…