回答編集履歴
1
推敲
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
TRANSFORM Sum(T_実績.数量) AS 数量の合計
|
8
8
|
|
9
|
-
SELECT T_実績.売先_CD, T_得意先M.得意先名称, T_実績.仕入先_CD, T_仕入先M.仕入先名称, T_実績.品目_CD, T_品目M.品名, T_実績.規格, T_実績.売立_
|
9
|
+
SELECT T_実績.売先_CD, T_得意先M.得意先名称, T_実績.仕入先_CD, T_仕入先M.仕入先名称, T_実績.品目_CD, T_品目M.品名, T_実績.規格, T_実績.売立_年, T_実績.売立_月
|
10
10
|
|
11
11
|
FROM ((T_実績 INNER JOIN T_得意先M ON T_得意先M.得意先コード = T_実績.売先_CD
|
12
12
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
WHERE 売立_年 In (2020,2021) AND 売立_月=6
|
18
18
|
|
19
|
-
GROUP BY T_実績.売先_CD, T_得意先M.得意先名称, T_実績.仕入先_CD, T_仕入先M.仕入先名称, T_実績.品目_CD, T_品目M.品名, T_実績.規格, T_実績.売立_
|
19
|
+
GROUP BY T_実績.売先_CD, T_得意先M.得意先名称, T_実績.仕入先_CD, T_仕入先M.仕入先名称, T_実績.品目_CD, T_品目M.品名, T_実績.規格, T_実績.売立_年, T_実績.売立_月
|
20
20
|
|
21
21
|
PIVOT DateDiff("ww",DateSerial(T_実績.売立_年,T_実績.売立_月,2),[売立日])+1 & "週";
|
22
22
|
|