写一个 sql,查询一个班级里各科分数最高的学生信息
写一个 sql,查询一个班级里各科分数最高的学生信息select b.* from (select subject,max(score) m from grade GROUP BY subject) t,grade b where t.subject=b.subject and t.m=b.score用一句SQL查出所有课程成绩最高和最低的学生及其分数select b.,“最高分” from (s
·
写一个 sql,查询一个班级里各科分数最高的学生信息
select b.* from (select subject,max(score) m from grade GROUP BY subject) t,grade b where t.subject=b.subject and t.m=b.score
用一句SQL查出所有课程成绩最高和最低的学生及其分数
select b.,“最高分” from (select subject,max(score) m from grade GROUP BY subject) t,grade b where t.subject=b.subject and t.m=b.score
UNION
select b.,“最低分” from (select subject,min(score) m from grade GROUP BY subject) t,grade b where t.subject=b.subject and t.m=b.score
更多推荐
已为社区贡献1条内容
所有评论(0)