Site: LeetCode
Difficulty per Site: Easy
Write a solution to find the first login date for each player.
Return the result table in any order. [Full Description]
-- Submitted Solution
WITH cte AS (
SELECT
player_id
,event_date
,ROW_NUMBER() OVER (PARTITION BY player_id ORDER BY event_date ASC) AS rownum
FROM Activity
)
SELECT
player_id
,event_date AS first_login
FROM cte
WHERE rownum = 1
;
-- LeetCode Solution
-- TBD
TBD
TBD