MySQL solution using Self Join and CTE
\nwith first_login as(\nselect player_id,MIN(event_date) as dates from Activity \nGROUP BY player_id)\n\nSELECT ROUND(COUNT(*)/(SELECT COUNT(DISTINCT player_id)
```\nwith first_login as(\nselect player_id,MIN(event_date) as dates from Activity \nGROUP BY player_id)\n\nSELECT ROUND(COUNT(*)/(SELECT COUNT(DISTINCT player_id) from Activity),2) as fraction from first_login a \njoin Activity b on DATEDIFF(b.event_date,a.dates) = 1\nAND a.player_id = b.player_id\n\n\n\n```
[]