select 学号,扣分项目,扣分分值=sum(扣分分值)
from 表
where 学号='01'
group by 学号,扣分项目