with tmp as ( select user_id, fdate, lag (fdate, 1, "0000-00-00") over ( partition by user_id order by fdate ) fadte_sub from tb_dau where fdate between "2023-01-01" and "2023-01-31" ) #使用lag 窗口函数,按用户id分组,登陆日期升序,进行日期偏移, tmp2 as ( select user_id, fdate, fadte_sub, datedi...