添加daily report生成

This commit is contained in:
pengtao 2019-10-22 10:52:45 +08:00
parent f7c2fc4352
commit bbcf32f1de

View File

@ -186,7 +186,7 @@ class Report:
and channel='{self.channelid}'
and "$part_event"='event_11_1'
and "$part_date"='{self.day}'
and fromappid='{fromappid}'"""
and from_appid='{fromappid}'"""
new_sql = f"""SELECT
count(distinct "#account_id")
FROM
@ -196,7 +196,7 @@ class Report:
and channel='{self.channelid}'
and "$part_event"='event_11_1'
and account_register_date between timestamp'{self.day} 00:00:00' and timestamp'{self.day} 23:59:59'
and fromappid='{fromappid}' """
and from_appid='{fromappid}' """
share_sql = f"""SELECT
count(distinct \"#account_id\")
@ -208,7 +208,7 @@ class Report:
and channel='{self.channelid}'
and "$part_event"='event_11_1'
and "$part_date"='{self.day}'
and fromappid='{fromappid}' """
and from_appid='{fromappid}' """
byshare_sql = f"""SELECT
count(distinct \"#account_id\")
@ -220,7 +220,7 @@ class Report:
and channel='{self.channelid}'
and "$part_event"='event_11_1'
and "$part_date"='{self.day}'
and fromappid='{fromappid}' """
and from_appid='{fromappid}' """
try:
activa = self.tga.get_data(activa_sql)[0][0] or 0
new = self.tga.get_data(new_sql)[0][0] or 0