--创建一个视图,包括每个备份的收入和
create view vw_bank
as
select role, SUM(inCome) as 'totalIncome' from bank group by role
go
--创建一个视图,包括笔试总分 笔试平均分
create view vw_stuMarks
as
select sum(WrittenExam) as'writtenExamtotalIncome' avg(WrittenExam) as'writtenExamavgIncome'
from stuMarks
go