按列合并结果集

原文 按列合并结果集

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

 

posted @ 2016-10-14 09:17  wenglabs  阅读(197)  评论(0编辑  收藏  举报