From 39604afb4287f3e9cbfb69c0975d760b32488f6b Mon Sep 17 00:00:00 2001
From: vainsocial <vainsocial@prod>
Date: Sat, 13 Jan 2018 11:04:13 +0000
Subject: fix surrender being summed with null

---
 crunch_hero_vs_hero.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'crunch_hero_vs_hero.sql')

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)
-- 
cgit v1.3.1

