select sno, sum(grade) as total ,avg(grade) as average
from sc
group by sno
select sum(grade)总成绩,avg(grade) 平均成绩from sc where sno in(select sno from sc where sno in('1001','1002','1003','1004','1005'))
select sum(grade) as 总分 ,avg(grade) as 平均分 from sc group by sno
select sno, sum(grade) over(partiton by sno ) 总分,avg(grade) over(partition by sno) 平均分
from sc