From e0dd71750fe81ccfe3b5bd35571a83fcc6b03693 Mon Sep 17 00:00:00 2001 From: Ove Aursand Date: Tue, 19 Nov 2024 00:04:35 +0100 Subject: [PATCH] Fix calculation of matches_won --- data/player.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/player.go b/data/player.go index b32ff9e0..681fe4cd 100644 --- a/data/player.go +++ b/data/player.go @@ -691,7 +691,7 @@ func GetMatchesPlayedPerPlayer() (map[int]*models.Player, error) { JOIN leg l ON l.id = s.leg_id JOIN matches m ON m.id = l.match_id LEFT JOIN leg l2 ON l2.id = s.leg_id AND l2.winner_id = p.id - LEFT JOIN matches m2 ON m2.id = l2.match_id AND l2.winner_id = p.id + LEFT JOIN matches m2 ON m2.id = l2.match_id AND m2.winner_id = p.id WHERE l.is_finished = 1 AND m.is_abandoned = 0 AND m.is_walkover = 0 GROUP BY s.player_id`) if err != nil {