From 764572460cc6b50fd253d45bf0821e00e7192f66 Mon Sep 17 00:00:00 2001
From: vainsocial <vainsocial@services>
Date: Sat, 6 May 2017 10:22:36 +0000
Subject: fix team crunch sql

---
 crunch_team.sql | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'crunch_team.sql')

diff --git a/crunch_team.sql b/crunch_team.sql
index fb94418..a11cc33 100644
--- a/crunch_team.sql
+++ b/crunch_team.sql
@@ -7,11 +7,11 @@ JOIN (
             WHEN tm_cnt=1 THEN 0.33
             WHEN tm_cnt=2 THEN 0.66
             WHEN tm_cnt=3 THEN 1.33
-        ) *
+        END) *
         (CASE
-            WHEN p.winner THEN 1
-            WHEN NOT p.winner THEN 0.7
-        ) *
+            WHEN p.winner=TRUE THEN 1
+            WHEN p.winner=FALSE THEN 0.7
+        END) *
         (CASE
             WHEN tm.status='initiate' THEN 10
             WHEN tm.status='member' THEN 75
-- 
cgit v1.3.1

