File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
solution/0500-0599/0534.Game Play Analysis III Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,12 @@ Result table:
64
64
### ** SQL**
65
65
66
66
``` sql
67
-
67
+ SELECT
68
+ player_id,
69
+ event_date,
70
+ SUM (games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
71
+ FROM Activity
72
+ ORDER BY 1 , 2 ;
68
73
```
69
74
70
75
<!-- tabs:end -->
Original file line number Diff line number Diff line change @@ -66,7 +66,12 @@ Note that for each player we only care about the days when the player logged in.
66
66
### ** SQL**
67
67
68
68
``` sql
69
-
69
+ SELECT
70
+ player_id,
71
+ event_date,
72
+ SUM (games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
73
+ FROM Activity
74
+ ORDER BY 1 , 2 ;
70
75
```
71
76
72
77
<!-- tabs:end -->
Original file line number Diff line number Diff line change
1
+ SELECT
2
+ player_id,
3
+ event_date,
4
+ SUM (games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
5
+ FROM Activity
6
+ ORDER BY 1 , 2 ;
You can’t perform that action at this time.
0 commit comments