表student(id,class,name) Score (student_id,score,subject) 求每个班各科平均分
Select a.class,b.subject,avg(b.score) from score b join student a on a.id =b.student.id group by a.class,b.subject;
Select a.class,b.subject,avg(b.score) from score b join student a on a.id =b.student.id group by a.class,b.subject;