Skip to content

Commit

Permalink
Fix calculation of matches_won
Browse files Browse the repository at this point in the history
  • Loading branch information
oveaurs committed Nov 18, 2024
1 parent fe7a58d commit e0dd717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e0dd717

Please sign in to comment.