select * from student_course
where sid in (select sid from student_course group by sid,score having count(*) > 1)
and score in (select scorefrom student_course group by sid,score having count(*) > 1)
select t2.id,t2.cid,t2.score from kmcgc.student_course t2 , (
select t1.cid,t1.score from kmcgc.student_course t1
group by t1.cid,t1.score having count(t1.score)>1) t3
where t2.cid=t3.cid and t2.score = t3.score
不同课程成绩相同
A.一个学生有两个相同成绩,并且课程不同
B.一个课程有两个相同的成绩
A和B哪个才是正确的解释呢
@代码中透露着杀气: B
select * from student_course
– 代码中透露着杀气 3年前where sid in (select sid from student_course group by sid,score having count() > 1)
and score in (select scorefrom student_course group by sid,score having count() > 1)