select
    user_id
from
    (
        select
            user_id,
            count(user_id) cons_day
        from
            (
                select
                    user_id,
                    day - row_number() over (
                        partition by
                            user_id
                    ) start_day
                from
                    (
                        select distinct
                            user_id,
                            day (log_time) day
                        from
                            login_tb
                    ) t
                    join register_tb using (user_id)
            ) t1
        group by
            user_id,
            start_day
    ) t2
where
    cons_day >= 3