码迷,mamicode.com
首页 > 其他好文 > 详细

按列合并结果集

时间:2016-10-14 10:03:39      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

原文 按列合并结果集

select c.student_id,c.chinese_name, sum(a.absence) absence_total,sum(a.credit) get_course_total,sum(a.coursecredit) reg_course_total
,(select credit from  sm_grade_credit where grade=11)
from sm_course_student a,sm_courses b,sm_students c
where
a.course_id=b.courseid and a.student_id=c.student_id and a.student_id like 11%
group by c.student_id,c.chinese_name

 

按列合并结果集

标签:

原文地址:http://www.cnblogs.com/arxive/p/5959078.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!