Classes More Than 5 Students

代碼: select class from a GROUP BY class HAVING COUNT(*)>=5 這樣依舊會報錯的,注意紅色框裏面,學生裏是不可以重複的。 正確代碼: select a.class FROM ( select DISTINCT student ,class ,COUNT(*) from a GROUP BY class,student ) a GROUP BY a
相關文章
相關標籤/搜索