select
  V.t,
  round(count(U.uid) / count(V.uid), 2)
from
  (
    (
      select
        uid,
        min(date(in_time)) t
      from
        tb_user_log
      group by
        uid
    ) as V
    left join (
      select
        uid,
        date(in_time) t
      from
        tb_user_log
      union
      select
        uid,
        date(out_time) t
      from
        tb_user_log
    ) as U on V.uid = U.uid
    and V.t = date_sub(U.t, INTERVAL 1 DAY)
  )
where
  date_format(V.t, "%Y-%m") = '2021-11'
group by
  V.t