I have a table that looks something like this:
Name Year Value A 2000 5 A 2001 3 A 2002 7 A 2003 1 B 2000
SELECT x.name, x.summary, (x.summary / COUNT(*)) as percents_of_total FROM tbl t INNER JOIN (SELECT name, SUM(value) as summary FROM tbl WHERE year BETWEEN 2000 AND 2001 GROUP BY name) x ON x.name = t.name GROUP BY x.name, x.summary