diff options
author | emkael <emkael@tlen.pl> | 2018-01-27 15:41:03 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-01-27 15:41:03 +0100 |
commit | 0ce3f79a2b72a110828de0407745cf34c31b17d5 (patch) | |
tree | d31f2167193894e030718c5ceec90e19d1e68203 /jfr_playoff/sql.py | |
parent | 3113c57b54474d5a0a71c83c4c46813d6a26759a (diff) |
SQL compatibility with configurations which reject mixing aggregate functions without GROUP BY clause
Fixes #4
Diffstat (limited to 'jfr_playoff/sql.py')
-rw-r--r-- | jfr_playoff/sql.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jfr_playoff/sql.py b/jfr_playoff/sql.py index 897c192..ab6d0be 100644 --- a/jfr_playoff/sql.py +++ b/jfr_playoff/sql.py @@ -22,6 +22,7 @@ JOIN #db#.scores sc2 AND sc2.room = 2 JOIN #db#.admin WHERE sc1.tabl = %s AND sc1.rnd = %s +GROUP BY sc1.tabl, sc1.rnd ''' TOWEL_COUNT = ''' @@ -29,6 +30,7 @@ SELECT #db#.admin.boardspersegment * SUM(#db#.segments.towel > 0) FROM #db#.segments JOIN #db#.admin WHERE #db#.segments.tabl = %s AND #db#.segments.rnd = %s +GROUP BY #db#.segments.tabl, #db#.segments.rnd ''' PREFIX = ''' |