use hngy
go
/*5.统计选修数据结构课程的学生的平均年龄。*/
select AVG(YEAR (getdate())-YEAR(Birth)+1) as 学生平均年龄
from StudentInfo,SC,CourseInfo
where SC.CNO=CourseInfo.CNO and SC.StuNo=StudentInfo.StuNO and CourseInfo.CName='数据结构'
5. 统计选修数据结构课程的学生的平均年龄。
最新推荐文章于 2022-11-30 18:38:19 发布