Anda dapat menghitung total (dan dari persentase yang diinginkan) dengan menggunakan subquery dalam klausa FROM:
SELECT Name,
SUM(Value) AS "SUM(VALUE)",
SUM(Value) / totals.total AS "% of Total"
FROM table1,
(
SELECT Name,
SUM(Value) AS total
FROM table1
GROUP BY Name
) AS totals
WHERE table1.Name = totals.Name
AND Year BETWEEN 2000 AND 2001
GROUP BY Name;
Perhatikan bahwa subquery tidak memiliki klausa WHERE yang memfilter tahun.