-
20200325 数据库连接查询面试题作业
2020-07-24 10:57#6 查询出语文最高分
SELECT MAX(sc.score),course.Cname from lemon_sc as sc INNER JOIN lemon_course as course on course.Cno=sc.Cno and course.Cname like '%语文'
#8 查询语数外三门成绩的平均分
SELECT AVG(sc.score),course.Cname from lemon_sc as sc INNER JOIN lemon_course as course on course.Cno=sc.Cno GROUP BY course.Cno
#9 查询报名孤独求败老师课程的学生信息
SELECT stu.* from lemon_student as stu INNER JOIN lemon_sc as sc on stu.Sno=sc.Sno INNER JOIN lemon_course as cou on sc.Cno=cou.Cno INNER JOIN lemon_teacher as tea on tea.Tno=cou.Tno where tea.Tname ='孤独求败'