select name1 name, Java, jdbc, hibernate,total from (select sc1.name name1, sc1.mark java from student_course2 sc1 where sc1.course='java') as a, (select sc2.name name2, sc2.mark jdbc from student_course2 sc2 where sc2.course='jdbc') as b, (select sc3.name name3, sc3.mark hibernate from student_course2 sc3 where sc3.course='hibernate') as c, (select sc4.name name4,sum(sc4.mark) total from student_course2 sc4 group by sc4.name) as d where name1=name2 and name2=name3 and name3=name4 order by total ASC;
+----------+------+------+-----------+-------+ | name | java | jdbc | hibernate | total | +----------+------+------+-----------+-------+ | wangwu | 40 | 30 | 20 | 90 | | lisi | 70 | 60 | 50 | 180 | | zhangsan | 100 | 90 | 80 | 270 | +----------+------+------+-----------+-------+ 3 rows in set (0.02 sec)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有