摘要: 表结构: • 成绩表(Grade),包含字段:GradeID(Int,自增), SNO(int, 学号), CNO(int, 课程号), Score(float,分数) 查询每门课程的平均(最高/最低)分及课程号; select avg(score) ,cno from [DBTest].[dbo].[grade] group by cnoselect max(score) ,cno from [DBTest].[dbo].[grade] group by cnoselect min(score) ,cno from [DBTest].[dbo].[grade] group by cno 查. 阅读全文
posted @ 2011-11-30 15:19 xiaoshiyilang 阅读(131) 评论(0) 推荐(0) 编辑