From adbf77ce8e9c751046c314d5f706d8aa5e4c5af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Fri, 16 Sep 2022 13:54:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E8=AE=BE=E5=A4=87LTV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/x_analysis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/x_analysis.py b/models/x_analysis.py index 9b7a4a3..c07bd6a 100644 --- a/models/x_analysis.py +++ b/models/x_analysis.py @@ -285,11 +285,12 @@ class XAnalysis: AND {where_str} AND {where_account_str} ) as a left join (select `{quota}`, unitPrice/100 as money, toDate(addHours(`#event_time`, `#zone_offset`)) as date from {self.game}.event - where {timed} and `#event_name` = 'pay' and {where_order_str} AND {where_account_str}) b + where `#event_name` = 'pay' and {where_order_str} AND {where_account_str}) b on a.`{quota}` = b.`{quota}` group by a.date) log on reg.date = log.date order by date """ + #{timed} and 计算LTV时,所选时间区间只是为了划分注册人群,截止时间应该按照当前时间执行 print(sql) return {'sql': sql, 'quota': quota, 'start_date': self.event_view['startTime'][:10],