//希望对你有帮助 select a.sid, b.sname, sum(case when  c.cname="course01" then a.score end) as "course01", sum(case when  c.cname="course02" then a.score end) as "course02", sum(case when  c.cname="course03" then a.score end) as "course03", sum(case when  c.cname="course04" then a.score end) as "course04", sum(a.score) as "总分", avg(a.score) as "平均分" from scores a left join stu b on a.sid=b.sid left join coures c on a.cid=c.cid group by b.sname order by a.sid
点赞 评论

相关推荐

10-14 23:01
已编辑
中国地质大学(武汉) Java
CUG芝士圈:虽然是网上的项目,但最好还是包装一下,然后现在大部分公司都在忙校招,十月底、十一月初会好找一些。最后,boss才沟通100家,别焦虑,我去年暑假找第一段实习的时候沟通了500➕才有面试,校友加油
点赞 评论 收藏
分享
牛客网
牛客企业服务