最后一题自己写的答案,姓名已经排序
select c.ci_id,max(x) from (select a.ci_id,wm_concat(case when instr(a.stu_ids,b.stu_id)> 0 then b.stu_name end ) over(partition BY a.ci_id order by b.stu_id)x from pm_ci a,pm_stu b)c group by c.ci_id
select c.ci_id,max(x) from (select a.ci_id,wm_concat(case when instr(a.stu_ids,b.stu_id)> 0 then b.stu_name end ) over(partition BY a.ci_id order by b.stu_id)x from pm_ci a,pm_stu b)c group by c.ci_id
2016-06-04
举报