DKY10000 opened a new issue, #23554: URL: https://github.com/apache/doris/issues/23554
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Description 目前发现漏斗分析函数window_funnel最多只能根据user_id进行GROUP BY获取总体转化率,但我希望能增加每日的UV,例如8月份每天的UV,功能如下: 窗口期为3天, 用户在2023-08-26点击了第一步,没有点击第二步和第三步 用户在2023-08-28点击了第一步和第二步以及第三步 那么计算出来的漏斗数据为 2023-08-26 step1:1 step2:1 step3:1 (因为窗口期为3天,滑动至08-28) 2023-08-28 step1:1 step2:1 step3:1 如果窗口期为当天 那么计算出来的漏斗数据为 2023-08-26 step1:1 step2:0 step3:0 (因为当天没有点第二步和第三步) 2023-08-28 step1:1 step2:1 step3:1 ### Use case 以下是我的sql:下面的sql无法实现我说的功能,因为进行了event_date的group by,只能当天的滑动窗口 select funnel.event_date, sum(if(step >= 1 , 1, 0)) as step1, sum(if(step >= 2 , 1, 0)) as step2, sum(if(step >= 3 , 1, 0)) as step3 from ( SELECT user_id,DATE(event_time) as event_date, window_funnel(3600 * 24 * 3,'defalut',event_time, event_key = 'App_Quanmaidian_Page_Exp' and (p__user_type = 1 or p__user_type = 2), event_key = 'Passenger_Xunjiaye_Gouquanrukou_Popbanner_Exp', event_key = 'Passenger_Trip_Youhuiquantuijiantanchuang_Popbanner_Exp' ) as step FROM ruqi_realtime.dwd_user_event_track_normal WHERE event_time>='2023-08-01 00:00:00' and event_time<='2023-08-24 00:00:00' and user_id is not null GROUP BY user_id,event_date ) as funnel group by funnel.event_date order by funnel.event_date ### Related issues _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
