select ROUND(count(distinct user_id)*1.0/(SELECT count(distinct user_id) from login),3) from login where (user_id,date) IN (select user_id,DATE_ADD(min(date),INTERVAL 1 DAY) from login group by user_id)