Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 755 Bytes

145_game_play_analysis_i.md

File metadata and controls

49 lines (35 loc) · 755 Bytes

SQL Everyday #145

Game Play Analysis I

Site: LeetCode
Difficulty per Site: Easy

Problem

Write a solution to find the first login date for each player.

Return the result table in any order. [Full Description]

Submitted Solution

-- 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
;

Site Solution

-- LeetCode Solution 
-- TBD

Notes

TBD

NB

TBD

Go to Index
Go to Overview