回答編集履歴
2
推敲
test
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
on evaluations.soccer_player_id=players.id
|
16
16
|
|
17
|
-
group by soccer_player_id
|
17
|
+
group by soccer_player_id, email
|
18
18
|
|
19
19
|
) edit
|
20
20
|
|
1
推敲
test
CHANGED
@@ -2,28 +2,22 @@
|
|
2
2
|
|
3
3
|
```SQL
|
4
4
|
|
5
|
-
select
|
5
|
+
select *
|
6
6
|
|
7
|
-
from
|
7
|
+
from (
|
8
8
|
|
9
|
-
|
9
|
+
select soccer_player_id, email, avg(evaluation) avg_evaluation
|
10
10
|
|
11
|
-
|
11
|
+
from evaluations
|
12
12
|
|
13
|
-
|
13
|
+
inner join players
|
14
14
|
|
15
|
-
|
15
|
+
on evaluations.soccer_player_id=players.id
|
16
16
|
|
17
|
-
|
17
|
+
group by soccer_player_id
|
18
18
|
|
19
|
-
|
19
|
+
) edit
|
20
20
|
|
21
|
-
|
21
|
+
order by avg_evaluation desc limit 3
|
22
|
-
|
23
|
-
) step2
|
24
|
-
|
25
|
-
inner join players
|
26
|
-
|
27
|
-
on step2.soccer_player_id=players.id
|
28
22
|
|
29
23
|
```
|