This commit is contained in:
wuaho 2021-07-27 20:41:09 +08:00
parent 3b45493e03
commit f7da81554b
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ async def ltv_model_sql(
df.fillna(0, inplace=True)
df.rename(columns={'date': '注册日期', 'cnt1': '角色数'}, inplace=True)
data = {
'titel': df.columns.tolist(),
'title': df.columns.tolist(),
'rows': df.values.tolist()
}

View File

@ -103,7 +103,7 @@ class XAnalysis:
qry = sa.select().where(*where, *where_ext)
sql = str(qry.compile(compile_kwargs={"literal_binds": True}))
where_str = sql.split('WHERE ')[1]
sql = f"""SELECT toYYYYMMDD(reg.date) as date,
sql = f"""SELECT toString(reg.date) as date,
cnt1,
{select_ltv_str}
FROM (SELECT toDate(addHours(`#event_time`, `#zone_offset`)) as date, uniqExact(`#account_id`) cnt1