Loading problem...
You are given a gameplay activity log table named Activity.
Each row represents one player's session activity on a calendar date:
Your task is to produce a compact onboarding snapshot: for every player, return the earliest date on which they appeared in Activity.
Output columns must be exactly:
Where first_login is the minimum event_date for that player.
Result row order is not important.
Supported submission formats:
Activity:
| player_id | device_id | event_date | games_played |
|-----------|-----------|-------------|--------------|
| 1 | 2 | 2016-03-01 | 5 |
| 1 | 2 | 2016-05-02 | 6 |
| 2 | 4 | 2017-06-25 | 1 |
| 3 | 3 | 2016-03-02 | 0 |
| 3 | 7 | 2018-07-03 | 5 |[
{"player_id": 1, "first_login": "2016-03-01"},
{"player_id": 2, "first_login": "2017-06-25"},
{"player_id": 3, "first_login": "2016-03-02"}
]Take the minimum event_date inside each player_id group.
Activity:
| player_id | device_id | event_date | games_played |
|-----------|-----------|-------------|--------------|
| 10 | 9 | 2020-01-10 | 0 |
| 10 | 3 | 2020-01-10 | 4 |
| 10 | 8 | 2020-03-11 | 2 |[
{"player_id": 10, "first_login": "2020-01-10"}
]Same-day records are allowed across devices; the earliest date remains 2020-01-10.
Activity:
| player_id | device_id | event_date | games_played |
|-----------|-----------|-------------|--------------|
| 7 | 2 | 2021-12-31 | 3 |
| 8 | 2 | 2022-01-01 | 1 |
| 8 | 5 | 2021-12-15 | 2 |
| 9 | 8 | 2024-02-29 | 6 |[
{"player_id": 7, "first_login": "2021-12-31"},
{"player_id": 8, "first_login": "2021-12-15"},
{"player_id": 9, "first_login": "2024-02-29"}
]Rows can be unsorted. Grouping plus minimum date still gives each player's first activity day.
Constraints