You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: solution/1200-1299/1212.Team Scores in Football Tournament/README.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,16 @@ Teams </code>table:
100
100
### **SQL**
101
101
102
102
```sql
103
-
103
+
# Write your MySQL query statement below
104
+
SELECTt.team_id
105
+
,t.team_name
106
+
,SUM(CASE WHEN t.team_id=m.host_teamANDm.host_goals>m.guest_goals THEN 3 WHEN m.host_goals=m.guest_goals THEN 1 WHEN t.team_id=m.guest_teamANDm.guest_goals>m.host_goals THEN 3 ELSE 0 END) AS num_points
Copy file name to clipboardexpand all lines: solution/1200-1299/1212.Team Scores in Football Tournament/README_EN.md
+10-1
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,16 @@ Matches table:
95
95
### **SQL**
96
96
97
97
```sql
98
-
98
+
# Write your MySQL query statement below
99
+
SELECTt.team_id
100
+
,t.team_name
101
+
,SUM(CASE WHEN t.team_id=m.host_teamANDm.host_goals>m.guest_goals THEN 3 WHEN m.host_goals=m.guest_goals THEN 1 WHEN t.team_id=m.guest_teamANDm.guest_goals>m.host_goals THEN 3 ELSE 0 END) AS num_points
,SUM(CASE WHEN t.team_id=m.host_teamANDm.host_goals>m.guest_goals THEN 3 WHEN m.host_goals=m.guest_goals THEN 1 WHEN t.team_id=m.guest_teamANDm.guest_goals>m.host_goals THEN 3 ELSE 0 END) AS num_points
0 commit comments