1. 查询和" 05 "号的同学学习的课程 完全相同的其他同学的信息 只需要在课程总数筛选那里把01修改成05 selectstu.*,r.t2_countfromstudentasstu,(selectdistinctt2.sidast2_sid,count(t2.cid)ast2_countfrom(selectsc.sid,sc.cidfromscwheresc.sid=01)t1innerjoin(selectsc.sid,sc.cidfromsc)t2ont1.cid...
题目: 查询和"01"号的同学学习的课程完全相同的其他同学的信息 表结构 思路 sql语句 select sc.S from sc as sc where S in (select distinct sc.S from sc where s<>'01' and C in(select distinct C from sc where s='01') group by S having count(1)=(select count(1) from sc where S=...
1. 查询和" 05 "号的同学学习的课程 完全相同的其他同学的信息 只需要在课程总数筛选那里把01修改成05 selectstu.*,r.t2_countfromstudentasstu,(selectdistinctt2.sidast2_sid,count(t2.cid)ast2_countfrom(selectsc.sid,sc.cidfromscwheresc.sid=01)t1innerjoin(selectsc.sid,sc.cidfromsc)t2ont1.cid...