with t1 as (select user_id,min(date) min_date from login group by user_id ) select a.date , case when b.min_date is null then 0.000 else b.p end p from (select distinct date from login) a left join (select min_date, round(count(date)*1.0/count(min_date),3) p from (select t1.*,t2.date from t1 left ...