**Season Owner Week Points Comment**
2013 A 1 5 Excellent
2013 A 2 9 Bad
2013 B 1 4 Ok
2013 B 2 5 Good
我試圖得到以下結果(如下圖),從表(以上)使用MySQL查詢。我想顯示最新一週的評論和總分。
Season Owner Points Comment
2013 A 14 Bad
2013 B 9 Good
以下(下)給了我正確的分組和總數,但評論不是來自最新的一週。想法?
Select Owner, sum(Points), Comment FROM Standings WHERE Season=2014 GROUP BY Owner
完美!正是我需要的。 – JD7 2014-10-06 01:14:17