回答編集履歴
2
追記
test
CHANGED
@@ -20,7 +20,10 @@
|
|
20
20
|
left join tb tb3
|
21
21
|
on tb3.company = ta.company
|
22
22
|
and tb3.file_name =ta.file_name3
|
23
|
+
where (ta.file_name1 is not null and tb1.file_name is null)
|
24
|
+
or (ta.file_name2 is not null and tb2.file_name is null)
|
25
|
+
or (ta.file_name3 is not null and tb3.file_name is null)
|
23
26
|
```
|
24
27
|
追記:
|
25
|
-
質問を見返してみると結果を
|
28
|
+
質問を見返してみると結果を詰めていますね。
|
26
|
-
|
29
|
+
上記SQLではそこまで対応していないので、対応するとしたら、unionしたものをクロス集計ですね。
|
1
追記
test
CHANGED
@@ -21,3 +21,6 @@
|
|
21
21
|
on tb3.company = ta.company
|
22
22
|
and tb3.file_name =ta.file_name3
|
23
23
|
```
|
24
|
+
追記:
|
25
|
+
質問を見返してみると結果をマージしてますね。
|
26
|
+
だとすると、unionしたものをクロス集計ですね。
|