From 9928436a09d8f276574667dd6db86ca22029b389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Mon, 17 Oct 2022 13:42:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A4=84=E7=90=86=E8=B7=AF=E5=BE=84=E5=88=86?= =?UTF-8?q?=E6=9E=90-=E7=94=A8=E6=88=B7=E7=AC=A6=E5=90=88=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/behavior_analysis.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/behavior_analysis.py b/models/behavior_analysis.py index 762def2..d1766a4 100644 --- a/models/behavior_analysis.py +++ b/models/behavior_analysis.py @@ -1196,11 +1196,11 @@ from (with from {self.game}.event where addHours(`#event_time`, {self.zone_time}) >= start_data and addHours(`#event_time`, {self.zone_time}) <= end_data - and `#event_name` in evnet_all) + and `#event_name` in evnet_all and {where_a}) group by `#account_id` HAVING has_midway_hit = 1 ) -where arrayElement(event_chain, 1) = start_event and {where_a} and "#account_id" IN (SELECT "#account_id" +where arrayElement(event_chain, 1) = start_event and "#account_id" IN (SELECT "#account_id" FROM (SELECT "#account_id" FROM {self.game}.user_view WHERE {where_b}) AS anon_b) @@ -1243,17 +1243,17 @@ from (with from {self.game}.event where addHours(`#event_time`, {self.zone_time}) >= start_data and addHours(`#event_time`, {self.zone_time}) <= end_data - and `#event_name` in evnet_all) + and `#event_name` in evnet_all and {where_a}) group by `#account_id` HAVING has_midway_hit = 1 ) -where arrayElement(event_chain, -1) = end_event and {where_a} and "#account_id" IN (SELECT "#account_id" +where arrayElement(event_chain, -1) = end_event and "#account_id" IN (SELECT "#account_id" FROM (SELECT "#account_id" FROM {self.game}.user_view WHERE {where_b}) AS anon_b) GROUP BY event_chain,`#account_id` ORDER BY values desc""" - + # initial_event 为初始事件,还有一个结束事件 sql = sql_a if source_type == 'initial_event' else sql_b print(sql) return {