Skip to content

added solution to lc:534 #780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion solution/0500-0599/0534.Game Play Analysis III/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ Result table:
### **SQL**

```sql

SELECT
player_id,
event_date,
SUM(games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
FROM Activity
ORDER BY 1, 2;
```

<!-- tabs:end -->
7 changes: 6 additions & 1 deletion solution/0500-0599/0534.Game Play Analysis III/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ Note that for each player we only care about the days when the player logged in.
### **SQL**

```sql

SELECT
player_id,
event_date,
SUM(games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
FROM Activity
ORDER BY 1, 2;
```

<!-- tabs:end -->
6 changes: 6 additions & 0 deletions solution/0500-0599/0534.Game Play Analysis III/Solution.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT
player_id,
event_date,
SUM(games_played) OVER (PARTITION BY player_id ORDER BY event_date) AS games_played_so_far
FROM Activity
ORDER BY 1, 2;