select round(count(t2.user_id)/count(t1.user_id),3)
from 
    (select user_id,min(date) first_date from login group by user_id) t1 
left join 
	login t2 
on t1.user_id = t2.user_id and date_add(t1.first_date,interval 1 day)=t2.date
;