Game Play Analysis II
To report the device that was first logged in for each player, you can join the Activity table with itself on the player_id column and apply conditions to filter the required results. Here’s the query:
|
|
Explanation:
- The subquery in the JOIN operation calculates the first login date for each player by using the
MIN
function, grouping the results by player_id. - Then, the main query joins this subquery result with the original Activity table on both the player_id and the first_login date. This ensures that the result includes the device_id corresponding to the first login date for each player.