sal查询
This commit is contained in:
parent
f0511b004d
commit
f13ceb6c77
@ -550,10 +550,10 @@ class BehaviorAnalysis:
|
||||
qry = sa.select(selectd).select_from(
|
||||
self.event_tbl.join(self.user_tbl, u_account_id_col == e_account_id_col)).where(
|
||||
and_(*user_filter, *event_filter, *base_where)).group_by(*groupby).order_by(
|
||||
*oredrby).limit(10000)
|
||||
*oredrby).limit(100000)
|
||||
else:
|
||||
qry = sa.select(selectd).where(and_(*base_where, *event_filter)).group_by(*groupby).order_by(
|
||||
*oredrby).limit(10000)
|
||||
*oredrby).limit(100000)
|
||||
sql = str(qry.compile(compile_kwargs={"literal_binds": True}))
|
||||
print(sql)
|
||||
return {'sql': sql,
|
||||
@ -731,11 +731,11 @@ class BehaviorAnalysis:
|
||||
qry = qry.order_by(sa.Column('date'))
|
||||
else:
|
||||
qry = qry.order_by(sa.Column('values').desc())
|
||||
qry = qry.limit(10000)
|
||||
qry = qry.limit(100000)
|
||||
sql = str(qry.compile(compile_kwargs={"literal_binds": True}))
|
||||
if event_name_display == '充值总额':
|
||||
sql=sql.replace("""GROUP BY toDate(addHours(huixie.event."#event_time", 8)) ORDER BY date
|
||||
LIMIT 10000""",'',1)
|
||||
LIMIT 100000""",'',1)
|
||||
print(sql)
|
||||
# 单独付费率的拿出来
|
||||
if event.get('customEvent') == 'pay.touch_user_count/login.touch_user_count':
|
||||
|
Loading…
Reference in New Issue
Block a user