Simple and easy solution ever
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n# Write your MySQL query statement below\nWITH temp AS (\n    SELECT player_id, MIN(event_date) AS first_login_date\n    FROM Activity \n    GROUP BY player_id\n)\n\n# Calculate the fraction of players who logged in exactly one day after their first login.\nSELECT \n    ROUND(\n        SUM(DATEDIFF(a.event_date, t.first_login_date) = 1) / COUNT(DISTINCT a.player_id), 2\n    ) AS fraction\nFROM Activity a\nJOIN temp t ON a.player_id = t.player_id;\n```
['MySQL']