✅ Simple solution using only CTE and Subquery ✅
\n# Approach\nNeed to undserstand the prob clear, requirement is we need to get the consective event_date and player_id. Important is consective event_date from
\n# Approach\nNeed to undserstand the prob clear, requirement is we need to get the consective event_date and player_id. Important is consective event_date from the First entry, hence used the MIN (to find the first entry)\n\nPrepared a CTE table that returns the MINIMUM event_date with next date and player_id.\n\nThen used the calculations and used the temp table outputs in the main table WHERE condition.\n# Code\n```postgresql []\n-- Write your PostgreSQL query statement below\nWITH temp as (SELECT MIN(event_date) + INTERVAL \'1 DAY\' min_day ,player_id FROM Activity GROUP BY player_id)\n\nSELECT ROUND(COUNT(*)::NUMERIC/(SELECT COUNT( DISTINCT player_id) FROM Activity),2) AS fraction FROM Activity \nWHERE (player_id, event_date) IN (SELECT player_id, min_day FROM temp)\n```
['PostgreSQL']