From 0ce3f79a2b72a110828de0407745cf34c31b17d5 Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 27 Jan 2018 15:41:03 +0100 Subject: SQL compatibility with configurations which reject mixing aggregate functions without GROUP BY clause Fixes #4 --- jfr_playoff/sql.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jfr_playoff') 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 = ''' -- cgit v1.2.3