回答編集履歴
2
訂正
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
※手打ちかつ未検証です。悪しからず。
|
2
|
+
|
1
3
|
```SQL
|
2
4
|
|
3
5
|
SELECT WO.ID, WO.SHIMEI, SA.RESULT_BASE
|
@@ -20,11 +22,11 @@
|
|
20
22
|
|
21
23
|
SELECT ID, SHIMEI
|
22
24
|
|
23
|
-
, CASE CODE WHEN 1 THEN BASE END BASE_01
|
25
|
+
, Max(CASE CODE WHEN 1 THEN BASE END) BASE_01
|
24
26
|
|
25
|
-
, CASE CODE WHEN 2 THEN BASE END BASE_02
|
27
|
+
, Max(CASE CODE WHEN 2 THEN BASE END) BASE_02
|
26
28
|
|
27
|
-
, CASE CODE WHEN 3 THEN BASE END BASE_03
|
29
|
+
, Max(CASE CODE WHEN 3 THEN BASE END) BASE_03
|
28
30
|
|
29
31
|
FROM SALARY
|
30
32
|
|
1
推敲
test
CHANGED
@@ -5,8 +5,6 @@
|
|
5
5
|
FROM WORKER WO
|
6
6
|
|
7
7
|
INNER JOIN (
|
8
|
-
|
9
|
-
|
10
8
|
|
11
9
|
SELECT ID, SHIMEI
|
12
10
|
|