用SQL语句表示下列问题?
1个回答
2020-04-14
展开全部
1、select name,count(class) from student_score sc left join student_info si on sc.id=si.id
GROUP BY name
HAVING count(class) =1;
2、select class,count(id) from student_info si GROUP BY class;
3、select name,count(class) as '选修课程',avg(score) as '每门平均',sum(score) as '所选总分' from student_score sc left join student_info si on sc.id=si.id
GROUP BY name
HAVING count(class) =1;
2、select class,count(id) from student_info si GROUP BY class;
3、select name,count(class) as '选修课程',avg(score) as '每门平均',sum(score) as '所选总分' from student_score sc left join student_info si on sc.id=si.id
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询