Simple solution with lead and rank
select round(count(distinct player_id )/(select count(distinct player_id) from Activity),2) as fraction from (\nselect player_id, event_date, datediff(lead(even
select round(count(distinct player_id )/(select count(distinct player_id) from Activity),2) as fraction from (\nselect player_id, event_date, datediff(lead(event_date) over(partition by player_id order by event_date),event_date) as ld,\n    row_number() over (partition by player_id order by event_date asc) as rnk\n    from Activity\norder by 1,2) as t\nwhere ld=1  and rnk=1
[]