Published on

Leetcode - 550. Game Play Analysis IV

Authors
  • avatar
    Name
    Indo Yoon
    Twitter
Table of Contents

문제

[Loading...

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

LeetCode

](https://leetcode.com/problems/game-play-analysis-iv/)

정답

SELECT ROUND(COUNT(A2.player_id)/COUNT(A1.player_id),2) AS fraction
FROM (SELECT player_id, MIN(event_date) AS first_login FROM Activity GROUP BY player_id) AS A1
LEFT JOIN Activity AS A2
ON A1.player_id = A2.player_id AND A1.first_login +1 = A2.event_date