level 8
(1) SELECT AVG(score) as score, s.sname from grade_s g LEFT JOIN student_s s on s.sno=g.sno GROUP BY cname
2017年11月22日 06点11分
2
level 2
表 student: studentid 学生编号, courseid 课程编号 , score 得分 primary key (studentid , courseid)
1 --平均成绩吧
select score/rc from (
select studentid ,sum(score) score ,counat(*) rc from student
group by studentid)
2 select studentid ,name from (
select studentid ,name ,sum(score) score ,counat(*) rc from student
where studentid not in(select studentid from student where score<60 )
group by studentid,name)
where score/rc>70
2017年12月04日 08点12分
3