From f75f9c97c6578a63a4d9ca499248c88892131e5f Mon Sep 17 00:00:00 2001 From: wuaho Date: Thu, 28 Oct 2021 11:32:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E5=B8=83=E5=88=86?= =?UTF-8?q?=E6=9E=90=20=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/behavior_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/behavior_analysis.py b/models/behavior_analysis.py index bee1221..646f820 100644 --- a/models/behavior_analysis.py +++ b/models/behavior_analysis.py @@ -585,11 +585,11 @@ ORDER BY level if self.time_particle == 'total': qry = sa.select( *self.groupby, values_col) \ .where(and_(*where)) \ - .group_by( *self.groupby) + .group_by( *self.groupby, e_account_id_col) else: qry = sa.select(event_date_col, *self.groupby, values_col) \ .where(and_(*where)) \ - .group_by(event_date_col, *self.groupby) + .group_by(event_date_col, *self.groupby, e_account_id_col) sql = str(qry.compile(compile_kwargs={"literal_binds": True})) print(sql)