题解 | 查询连续登陆的用户
select user_id from ( select rt.user_id, day(lt.log_time) - row_number() over(partition by rt.user_id order by lt.log_time) as fake_time from register_tb as rt left join login_tb as lt on rt.user_id = lt.user_id ) as a group by user_id, fake_time having count(fake_time) >= 3