Skip to content

Commit d70482e

Browse files
authored
feat: add sql solution to lc problem: No.0534 (doocs#780)
No.0534.Game Play Analysis III
1 parent 4b3bc8a commit d70482e

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

solution/0500-0599/0534.Game Play Analysis III/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ Result table:
6464
### **SQL**
6565

6666
```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;
6873
```
6974

7075
<!-- tabs:end -->

solution/0500-0599/0534.Game Play Analysis III/README_EN.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ Note that for each player we only care about the days when the player logged in.
6666
### **SQL**
6767

6868
```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;
7075
```
7176

7277
<!-- tabs:end -->
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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;

0 commit comments

Comments
 (0)