回答編集履歴
1
商品1種類しか加味されてなかったので修正
test
CHANGED
@@ -34,6 +34,10 @@
|
|
34
34
|
|
35
35
|
item
|
36
36
|
|
37
|
+
GROUP BY
|
38
|
+
|
39
|
+
item
|
40
|
+
|
37
41
|
) mxitem
|
38
42
|
|
39
43
|
join item mxpriceitem ON
|
@@ -52,15 +56,15 @@
|
|
52
56
|
|
53
57
|
SELECT
|
54
58
|
|
55
|
-
max_item.item
|
59
|
+
max_item.item,
|
56
60
|
|
57
|
-
|
61
|
+
max_price,
|
58
62
|
|
59
|
-
|
63
|
+
max_date,
|
60
64
|
|
61
|
-
|
65
|
+
min_price,
|
62
66
|
|
63
|
-
|
67
|
+
min_date
|
64
68
|
|
65
69
|
FROM
|
66
70
|
|
@@ -85,6 +89,10 @@
|
|
85
89
|
MAX(price) max_price
|
86
90
|
|
87
91
|
FROM
|
92
|
+
|
93
|
+
item
|
94
|
+
|
95
|
+
GROUP BY
|
88
96
|
|
89
97
|
item
|
90
98
|
|
@@ -120,6 +128,10 @@
|
|
120
128
|
|
121
129
|
item
|
122
130
|
|
131
|
+
GROUP BY
|
132
|
+
|
133
|
+
item
|
134
|
+
|
123
135
|
) mnitem
|
124
136
|
|
125
137
|
JOIN item mnpriceitem ON
|