diff --git a/GreadyPoang.DataLayer/DataClasses/CombinedRepository.cs b/GreadyPoang.DataLayer/DataClasses/CombinedRepository.cs index 4d01f3c..f2db7c6 100644 --- a/GreadyPoang.DataLayer/DataClasses/CombinedRepository.cs +++ b/GreadyPoang.DataLayer/DataClasses/CombinedRepository.cs @@ -52,14 +52,14 @@ public class CombinedRepository : ICombinedRepository gp.GamePointId, gp.GameRoundId, gp.GameRoundRegNr, - gp.GameRegPoints, + latest.totPoints as GameRegPoints, gr.GameRoundStartDate, gr.GameStatus AS Status, p.ParticipantId, (p.LastName || ' ' || p.FirstName) AS ParticipantName FROM GamePoints gp INNER JOIN ( - SELECT ParticipantId, GameRoundId, MAX(GamePointId) AS MaxGamePointId + SELECT ParticipantId, GameRoundId, MAX(GamePointId) AS MaxGamePointId , sum(GameRegPoints) AS totPoints FROM GamePoints GROUP BY ParticipantId, GameRoundId ) latest ON gp.GamePointId = latest.MaxGamePointId