如何組合兩者以顯示學生人數超過6的班級的學生姓名(sname
)和部門編號(sectno
)?到目前爲止,我有這個在SQL中合併頻率計數和INNER CASE
SELECT student.sname, enroll.sectno,
FROM student
INNER JOIN enroll
ON student.sid=enroll.sid
與
SELECT grade,
COUNT(grade)AS Frequency
FROM enroll
GROUP BY grade
HAVING COUNT(grade)>6
什麼是'student'和'enroll'表之間的關係? –