-
leetcode - 511. Game Play Analysis ISQL 문제풀이 2022. 6. 30. 17:04
난이도 : Easy
Table: Activity
+--------------+---------+ | Column Name | Type | +--------------+---------+ | player_id | int | | device_id | int | | event_date | date | | games_played | int | +--------------+---------+ (player_id, event_date) is the primary key of this table. This table shows the activity of players of some games. Each row is a record of a player who logged in and played a number of games (possibly 0) before logging out on someday using some device.
Write an SQL query to report the first login date for each player.
Return the result table in any order.
SELECT player_id , MIN(event_date) first_login FROM Activity GROUP BY player_id
Accepted
'SQL 문제풀이' 카테고리의 다른 글
leetcode - 577. Employee Bonus (0) 2022.06.30 leetcode - 512. Game Play Analysis II (0) 2022.06.30 leetcode - 197. Rising Temperature (0) 2022.06.30 leetcode - 196. Delete Duplicate Emails (0) 2022.06.30 leetcode - 574. Winning Candidate (0) 2022.06.29