End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
player_id and the minimum event_date for each player by grouping the Activity table by player_id.player_id and device_id from the Activity table where the combination of player_id and event_date matches the ones found in the subquery.IN operator is used to match the tuples of player_id and event_date from the subquery with those in the main Activity table.player_id and device_id showing the first device each player logged in with.
erDiagram
Activity {
int player_id
int device_id
date event_date
int games_played
player_id event_date PK
}