111
This commit is contained in:
parent
7580c1e563
commit
57bb539d4d
@ -40,7 +40,7 @@ class CombinationEvent:
|
|||||||
result = round(result, 2)
|
result = round(result, 2)
|
||||||
elif self.format == 'integer':
|
elif self.format == 'integer':
|
||||||
result = result.astype(int)
|
result = result.astype(int)
|
||||||
return result.to_list(), result.sum(), round(result.mean(), 2)
|
return result.to_list(), round(result.sum(), 2), round(result.mean(), 2)
|
||||||
|
|
||||||
|
|
||||||
class CustomEvent:
|
class CustomEvent:
|
||||||
@ -641,7 +641,8 @@ ORDER BY level
|
|||||||
elif event.get('quota'):
|
elif event.get('quota'):
|
||||||
event_attr_col = getattr(self.event_tbl.c, event['quota'])
|
event_attr_col = getattr(self.event_tbl.c, event['quota'])
|
||||||
|
|
||||||
qry = sa.select(event_date_col,e_account_id_col, settings.CK_FUNC[analysis](event_attr_col).label('values')) \
|
qry = sa.select(event_date_col, e_account_id_col,
|
||||||
|
settings.CK_FUNC[analysis](event_attr_col).label('values')) \
|
||||||
.where(and_(*where)) \
|
.where(and_(*where)) \
|
||||||
.group_by(event_date_col, *self.groupby, e_account_id_col)
|
.group_by(event_date_col, *self.groupby, e_account_id_col)
|
||||||
sql = str(qry.compile(compile_kwargs={"literal_binds": True}))
|
sql = str(qry.compile(compile_kwargs={"literal_binds": True}))
|
||||||
|
Loading…
Reference in New Issue
Block a user