101
0/304
Loading content...
A game analytics pipeline stores player activity in one table:
activity columns:
The pair (player_id, event_date) is unique.
Definitions:
Task:
Output requirements:
Supported submission environments:
activity:
| 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-01 | 0 |
| 3 | 4 | 2016-07-03 | 5 |[
{"install_dt":"2016-03-01","installs":2,"day1_retention":0.5},
{"install_dt":"2017-06-25","installs":1,"day1_retention":0.0}
]For 2016-03-01, players 1 and 3 installed, and only player 1 returned on day+1. For 2017-06-25, player 2 did not return on day+1.
activity:
| player_id | device_id | event_date | games_played |
|-----------|-----------|-------------|--------------|
| 10 | 9 | 2024-01-10 | 3 |
| 10 | 9 | 2024-01-11 | 1 |
| 11 | 5 | 2024-01-10 | 2 |
| 11 | 8 | 2024-01-11 | 4 |
| 12 | 4 | 2024-01-15 | 7 |[
{"install_dt":"2024-01-10","installs":2,"day1_retention":1.0},
{"install_dt":"2024-01-15","installs":1,"day1_retention":0.0}
]All players in cohort 2024-01-10 returned next day; player 12 did not.
activity:
| player_id | device_id | event_date | games_played |
|-----------|-----------|-------------|--------------|
| 100 | 3 | 2023-08-01 | 1 |
| 101 | 2 | 2023-08-01 | 5 |
| 102 | 4 | 2023-08-01 | 0 |
| 100 | 5 | 2023-08-05 | 9 |
| 101 | 2 | 2023-08-02 | 2 |[
{"install_dt":"2023-08-01","installs":3,"day1_retention":0.33}
]Only player 101 returns on day+1. Cohort retention is 1/3 = 0.33.
Constraints