題目38:檢索至少選修兩門課程的學生學號
SELECT studentid ,COUNT(courseid) AS a
FROM student_score GROUP BY studentid HAVING a >=2
題目39:查詢選修了全部課程的學生信息
GROUP BY studentid 然后count(score)=全部課程數
SELECT student.* FROM student,
(SELECT studentid,COUNT(courseid) AS a FROM student_score GROUP BY studentid
HAVING a = (SELECT COUNT(*) FROM student_course))r WHERE student.id = r.studentid