>_
game_play_analysis.sql
MariaDB 11.4
Not run yet

+ 5 hidden

Input
player_activity
player_id  device_id  play_date   games_played
1          2          2024-03-01  5
1          2          2024-03-02  3
2          7          2024-03-03  2
3          1          2024-02-27  4
1          4          2024-03-05  1
3          1          2024-03-04  6
Expected
[{"player_id": 1, "first_login": "2024-03-01"}, {"player_id": 2, "first_login": "2024-03-03"}, {"player_id": 3, "first_login": "2024-02-27"}]

Player 1 played on three days and the earliest is March 1. Player 2 has a single row, so that day is the first login. Player 3 played on February 27 before March 4.