summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-06-23 22:28:14 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-06-23 22:28:14 +0200
commitb7420ecd6f47273989d315f3e13cf894d2aac7cf (patch)
tree7ab49ffab8a62b67a91b8bbaf5284f67e119b177
parent3f09fc30e8fe32f25f3efa4ac4e0b8d5ca10ba06 (diff)
downloadcruncher-b7420ecd6f47273989d315f3e13cf894d2aac7cf.tar.gz
cruncher-b7420ecd6f47273989d315f3e13cf894d2aac7cf.zip
fix filter joins
-rw-r--r--crunch_global.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/crunch_global.sql b/crunch_global.sql
index d7123b9..fe34356 100644
--- a/crunch_global.sql
+++ b/crunch_global.sql
@@ -41,7 +41,7 @@ JOIN `region` ON `region`.`name` = `player`.`shard_id` OR `region`.`name` = 'all
-- filters
JOIN `global_point_filters` ON `player`.`match_api_id` = `global_point_filters`.`match_api_id`
-JOIN `filter` ON (`filter`.`name` = 'all' AND `filter`.`dimension_on` = 'global') OR `global_point_filters`.`filter_id` = `filter`.`id`
+JOIN `filter` ON (`filter`.`name` = 'all' AND `filter`.`dimension_on` = 'global') OR `filter`.`id` IN (SELECT `global_point_filters`.`filter_id` FROM `global_point_filters` WHERE `global_point_filters`.`match_api_id` = `player`.`match_api_id`)
-- being cheap
JOIN `game_mode` ON `game_mode`.`id` = `player`.`game_mode_id` OR `game_mode`.`name` = 'all'