select r.cno, (select cname from course c where c.cno = r.cno) cname from student s, regist r where s.sname in ('송강호', '장나라') and r.sno = s.sno group by r.cno having count(*) > 1


두사람의 regist를 group by 하고, 겹치는 과목을 카운팅하면 2, 겹치지 않는 과목은 1 이라는걸 이용하면 될거임. having절을 써서 구현했다



캡쳐해놨다 이새끼야

답도 알려준다

이거대로 써갖구가면 베낀거니 감점 ㄲㄲ