关于 查询满足以下条件同学的学号及对应姓名:
与A同学一起修读过至少一门课程,已知A同学的学号是“01” 问题,怎么让01同学的数据也被查询到呢?
select * from student
where s_id in(
select distinct s_id from score where s_id not in(
select s_id from score where c_id not in (select c_id from score where s_id='01'))
group by s_id
having count(c_id) =(select count(c_id) from score where s_id='01') and s_id <> '01'
)