Prøv dette:
SELECT sum(a.total)
FROM (SELECT sum(size) as total
FROM mytable group by name) a
OPDATERING Jeg beklager, jeg kan ikke læse, at du vil have det hele i den samme forespørgsel. Af denne grund svaret fra greg det er bedre. Dog en anden mulighed, hvis du har en postgresql version>=9:
WITH mytableWith (name, sum) as
(SELECT name, sum(size)
FROM mytable
GROUP BY name)
SELECT 'grand total' AS name,
sum(sum) AS sum
FROM mytableWith
UNION ALL
SELECT name, sum
FROM mytableWith