diff options
| author | vainsocial <vainsocial@prod> | 2018-01-13 11:04:13 +0000 |
|---|---|---|
| committer | vainsocial <vainsocial@prod> | 2018-01-13 11:04:13 +0000 |
| commit | 39604afb4287f3e9cbfb69c0975d760b32488f6b (patch) | |
| tree | 7d3739edadde267f416c55f6d395fd4dda1d6954 | |
| parent | 4963e137a792727554e175f7de668124e2d741d3 (diff) | |
| download | cruncher-39604afb4287f3e9cbfb69c0975d760b32488f6b.tar.gz cruncher-39604afb4287f3e9cbfb69c0975d760b32488f6b.zip | |
fix surrender being summed with null
| -rw-r--r-- | crunch_global.sql | 6 | ||||
| -rw-r--r-- | crunch_hero_vs_hero.sql | 2 | ||||
| -rw-r--r-- | crunch_player.sql | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crunch_global.sql b/crunch_global.sql index b9ba013..366549c 100644 --- a/crunch_global.sql +++ b/crunch_global.sql @@ -16,7 +16,7 @@ select -- everything added here needs to be in on DUPLICATE too!!! count(p.id) as played, sum(cast(p.winner as INT)) as wins, - sum(p.trueskill_delta) as trueskill_delta, + sum(coalesce(p.trueskill_delta)) as trueskill_delta, sum(p_s.duration) as time_spent, sum(p_s.kills) as kills, sum(p_s.deaths) as deaths, @@ -30,8 +30,8 @@ select sum(p_s.kraken_captures) as kraken_captures, sum(p_s.turret_captures) as turret_captures, sum(p_s.gold) as gold, - sum(p_s.impact_score) as impact_score, - sum(p_i.surrender) as surrender, + round(sum(p_s.impact_score)) as impact_score, + sum(coalesce(p_i.surrender, 0)) as surrender, _p_i_item_uses_insert from participant p join participant_stats p_s on (p_s.participant_api_id = p.api_id) diff --git a/crunch_hero_vs_hero.sql b/crunch_hero_vs_hero.sql index 4b31b3f..4e4f124 100644 --- a/crunch_hero_vs_hero.sql +++ b/crunch_hero_vs_hero.sql @@ -33,7 +33,7 @@ select sum(p_s.turret_captures) as turret_captures, sum(p_s.gold) as gold, sum(p_s.impact_score) as impact_score, - sum(p_i.surrender) as surrender, + sum(coalesce(p_i.surrender, 0)) as surrender, _p_i_item_uses_insert from participant p join participant_stats p_s on (p_s.participant_api_id = p.api_id) diff --git a/crunch_player.sql b/crunch_player.sql index df6243b..0324e23 100644 --- a/crunch_player.sql +++ b/crunch_player.sql @@ -28,7 +28,7 @@ select sum(p_s.turret_captures) as turret_captures, sum(p_s.gold) as gold, sum(p_s.impact_score) as impact_score, - sum(p_i.surrender) as surrender, + sum(coalesce(p_i.surrender, 0)) as surrender, _p_i_item_uses_insert from participant p join participant_stats p_s on (p_s.participant_api_id = p.api_id) |
