Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e39eb75

Browse files
committed
LeetCode 500~600 mysql
1 parent 15318b4 commit e39eb75

File tree

31 files changed

+99
-346
lines changed

31 files changed

+99
-346
lines changed

‎solution/0500-0599/0511.Game Play Analysis I/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ None
1616
### **SQL**
1717

1818
```
19-
19+
select player_id, min(event_date) as first_login from Activity group by player_id
2020
```
2121

2222
<!-- tabs:end -->

‎solution/0500-0599/0511.Game Play Analysis I/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ None
1414
### **SQL**
1515

1616
```
17-
17+
select player_id, min(event_date) as first_login from Activity group by player_id
1818
```
1919

2020
<!-- tabs:end -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select player_id, min(event_date) as first_login from Activity group by player_id

‎solution/0500-0599/0512.Game Play Analysis II/README.md‎

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,10 @@ None
1313

1414
<!-- tabs:start -->
1515

16-
### **Python3**
17-
<!-- 这里可写当前语言的特殊实现逻辑 -->
16+
### **SQL**
1817

19-
```python
20-
21-
```
22-
23-
### **Java**
24-
<!-- 这里可写当前语言的特殊实现逻辑 -->
25-
26-
```java
27-
28-
```
29-
30-
### **...**
3118
```
32-
19+
select player_id, device_id from Activity where (player_id, event_date) in ((select player_id, min(event_date) from Activity group by player_id))
3320
```
3421

35-
<!-- tabs:end -->
22+
<!-- tabs:end -->

‎solution/0500-0599/0512.Game Play Analysis II/README_EN.md‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,10 @@ None
1111

1212
<!-- tabs:start -->
1313

14-
### **Python3**
14+
### **SQL**
1515

16-
```python
17-
18-
```
19-
20-
### **Java**
21-
22-
```java
23-
24-
```
25-
26-
### **...**
2716
```
28-
17+
select player_id, device_id from Activity where (player_id, event_date) in ((select player_id, min(event_date) from Activity group by player_id))
2918
```
3019

31-
<!-- tabs:end -->
20+
<!-- tabs:end -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select player_id, device_id from Activity where (player_id, event_date) in ((select player_id, min(event_date) from Activity group by player_id))

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

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,10 @@ None
1313

1414
<!-- tabs:start -->
1515

16-
### **Python3**
17-
<!-- 这里可写当前语言的特殊实现逻辑 -->
16+
### **SQL**
1817

19-
```python
20-
21-
```
22-
23-
### **Java**
24-
<!-- 这里可写当前语言的特殊实现逻辑 -->
25-
26-
```java
27-
28-
```
29-
30-
### **...**
3118
```
32-
19+
select a.player_id, a.event_date, sum(b.games_played) as games_played_so_far from Activity a, Activity b where a.player_id = b.player_id and a.event_date >= b.event_date group by a.player_id, a.event_date
3320
```
3421

35-
<!-- tabs:end -->
22+
<!-- tabs:end -->

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,10 @@ None
1111

1212
<!-- tabs:start -->
1313

14-
### **Python3**
14+
### **SQL**
1515

16-
```python
17-
18-
```
19-
20-
### **Java**
21-
22-
```java
23-
24-
```
25-
26-
### **...**
2716
```
28-
17+
select a.player_id, a.event_date, sum(b.games_played) as games_played_so_far from Activity a, Activity b where a.player_id = b.player_id and a.event_date >= b.event_date group by a.player_id, a.event_date
2918
```
3019

31-
<!-- tabs:end -->
20+
<!-- tabs:end -->
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
select a.player_id, a.event_date, sum(b.games_played) as games_played_so_far from Activity a, Activity b where a.player_id = b.player_id and a.event_date >= b.event_date group by a.player_id, a.event_date

‎solution/0500-0599/0550.Game Play Analysis IV/README.md‎

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,10 @@ None
1313

1414
<!-- tabs:start -->
1515

16-
### **Python3**
17-
<!-- 这里可写当前语言的特殊实现逻辑 -->
16+
### **SQL**
1817

19-
```python
20-
21-
```
22-
23-
### **Java**
24-
<!-- 这里可写当前语言的特殊实现逻辑 -->
25-
26-
```java
27-
28-
```
29-
30-
### **...**
3118
```
3219
3320
```
3421

35-
<!-- tabs:end -->
22+
<!-- tabs:end -->

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /