Game Play Analysis IV
Task: Report the fraction of players that logged in again on the day after the day they first logged in.
Table: Activity
+--------------+------+
| Column Name | Type |
+--------------+------+
| player_id | INT |
| device_id | INT |
| event_date | date |
| games_played | INT |
+--------------+------+
Input: Activity table:
+-----------+-----------+------------+--------------+
| player_id | device_id | event_date | games_played |
+-----------+-----------+------------+--------------+
| 1 | 2 | 2016-03-01 | 5 |
| 1 | 2 | 2016-03-02 | 6 |
| 2 | 3 | 2017-06-25 | 1 |
| 3 | 1 | 2016-03-02 | 0 |
| 3 | 4 | 2016-03-03 | 5 |
+-----------+-----------+------------+--------------+
Output:
+----------+
| fraction |
+----------+
| 0.67 |
+----------+