0550.sql (277B)
1 SELECT ROUND(COUNT(DISTINCT player_id) / (SELECT COUNT(DISTINCT player_id) FROM Activity), 2) AS fraction 2 FROM Activity 3 WHERE (player_id, DATE_SUB(event_date, INTERVAL 1 DAY)) IN ( 4 SELECT player_id, MIN(event_date) as first_date 5 FROM Activity 6 GROUP BY player_id 7 ) 8