From 0b37ae96e446df3af3f37694672daaca2fbc2c96 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Mon, 24 Jul 2017 13:26:59 +0200
Subject: split crunch queues

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

(limited to 'crunch_player.sql')

diff --git a/crunch_player.sql b/crunch_player.sql
index 8ddedb4..75432e8 100644
--- a/crunch_player.sql
+++ b/crunch_player.sql
@@ -40,7 +40,7 @@ join filter f on (f.dimension_on = 'player' and (f.name = 'all' or f.id in (sele
 join series s on (p_s.created_at between s.start and s.end and s.dimension_on = 'player')
 join hero h on (p.hero_id = h.id or h.name = 'all')
 join role r on ((p.role_id = r.id and h.name = 'all') or r.name = 'all')  -- do not cross hero x role
-join game_mode gm on (p.game_mode_id = gm.id or gm.name = 'all')
+join game_mode gm on ((p.game_mode_id = gm.id and h.name = 'all' and r.name = 'all') or gm.name = 'all')  -- do not cross mode x role / mode x hero
 
 where p.api_id in (:participant_api_ids)
 
-- 
cgit v1.3.1

