Well ... first off, I have to ask why you are using variables and temp tables for such a simple process ...
select Students, Sum(Scores) Total,
from members
where Students = 'Amy'
group by Students
Anyhow, you can't use global temp tables in data transformations, which, if you think about it...