반응형
```
SELECT ROUND(COUNT(t2.player_id)/COUNT(t1.player_id),2) AS fraction
FROM
(SELECT player_id, MIN(event_date) AS first_login FROM Activity GROUP BY player_id) t1 LEFT JOIN Activity t2
ON t1.player_id = t2.player_id AND t1.first_login = t2.event_date - 1
```
반응형
'sql문제' 카테고리의 다른 글
610. Triangle Judgement (0) | 2022.09.05 |
---|---|
574. Winning Candidate (0) | 2022.09.05 |
570. Managers with at Least 5 Direct Reports (0) | 2022.09.04 |