Simple SQL solution
Runtime:591ms\n\n\nwith temp as (\n    select player_id, min(event_date) as first_login\n    from activity\n    group by player_id\n)\nselect round( sum(case\n 
Runtime:591ms\n\n```\nwith temp as (\n    select player_id, min(event_date) as first_login\n    from activity\n    group by player_id\n)\nselect round( sum(case\n           when datediff(first_login,event_date) =-1 then 1\n           else 0\n          end) /count(distinct temp.player_id), 2) as fraction\nfrom temp join activity a\non temp.player_id = a.player_id;\n```\nUsing temp to select all the first login date of all id. Then join temp and activity using player_id.\nIf an id is qualified then there its datediff between ``` temp ``` and ``` activity.event_date ```should be -1.
[]