diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-21 11:40:23 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-21 11:40:23 +0200 |
| commit | 718339cf0446798e10d1591273077905137e7392 (patch) | |
| tree | 69e4159621cc558eb132b5a2447af1810b983177 | |
| parent | aa8c71b8f484a62d1c9623e3bda2f364bc3a73ab (diff) | |
| download | cruncher-718339cf0446798e10d1591273077905137e7392.tar.gz cruncher-718339cf0446798e10d1591273077905137e7392.zip | |
global point: pay respect to dimension_on
| -rw-r--r-- | crunch_global.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crunch_global.sql b/crunch_global.sql index 3b14885..0a2ab4b 100644 --- a/crunch_global.sql +++ b/crunch_global.sql @@ -32,7 +32,7 @@ select sum(p_s.impact_score) as impact_score from participant p join participant_stats p_s on (p_s.participant_api_id = p.api_id) -join filter f on ((f.name = 'all' and f.dimension_on = 'global') or f.id in (select gpf.filter_id from global_point_filters gpf where gpf.match_api_id = p.match_api_id)) +join filter f on (f.dimension_on = 'global' and (f.name = 'all' or f.id in (select gpf.filter_id from global_point_filters gpf where gpf.match_api_id = p.match_api_id))) join series s on (p_s.created_at between s.start and s.end and s.dimension_on = 'global') join hero h on (p.hero_id = h.id or h.name = 'all') join role r on (p.role_id = r.id or r.name = 'all') |
