diff options
Diffstat (limited to 'crunch_player.sql')
| -rw-r--r-- | crunch_player.sql | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crunch_player.sql b/crunch_player.sql index 4a36bb7..b3ca8c6 100644 --- a/crunch_player.sql +++ b/crunch_player.sql @@ -9,6 +9,7 @@ select gm.id as game_mode_id, r.id as role_id, + -- everything added here needs to be in on DUPLICATE too!!! count(p.id) as played, sum(cast(p.winner as INT)) as wins, @@ -52,8 +53,8 @@ played = played + values(played), wins = wins + values(wins), time_spent = time_spent + values(time_spent), trueskill = case when values(trueskill) > trueskill then values(trueskill) else trueskill end, -trueskill_mu = trueskill_mu + values(trueskill_mu), -trueskill_sigma = trueskill_sigma + values(trueskill_sigma), +trueskill_mu = case when values(trueskill_mu) > trueskill_mu then values(trueskill_mu) else trueskill_mu end, +trueskill_sigma = case when values(trueskill_sigma) > trueskill_sigma then values(trueskill_sigma) else trueskill_sigma end, elo = elo + values(elo), kills = kills + values(kills), deaths = deaths + values(deaths), |
