表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;

posted @ 2023-01-30 14:50  小涵豆  阅读(87)  评论(0)    收藏  举报