我已經嘗試了很多沒有成功,我只想顯示下表中顯示的學生列表中學生分數的最大平均值。尋找學生的最高平均分
我的表
我想要得到的結果如下
預期輸出
是我迄今所做
SELECT MAX(a.Total_Qty) As TotalMax,a.studentId
FROM(
SELECT AVG(s.marks) AS Total_Qty,s.studentId
FROM results s
WHERE s.stream = 'Form One'
GROUP BY s.studentId) AS a
您想要學生或所有學生的平均音符嗎? – Youness 2014-09-05 08:38:27
我想讓一個學生獲得最高的平均分 – dxcoder1 2014-09-05 08:47:28