查询和" 01 "同学学习的课程完全相同的其他同学
select
sid
from
(select
sid,group_concat(cid order by cid) str1
from
sc
group by sid) t1,
(select
group_concat(cid order by cid) str2
from
sc
where
sid='01') t2
where
t1.str1=t2.str2
and
t1.sid<>'01'