質問編集履歴
2
説明追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
|
84
84
|
|
85
|
-
やりたいこと:3日連続todays_close > ago_closeとなっているものの最新の値(この場合6/27)を表示したい。(今の時点では6/25のものが表示されてしまう)
|
85
|
+
やりたいこと:最新のデータから3日連続todays_close > ago_closeとなっているもの(27,26,25日)の最新の値(この場合6/27のもの)を表示したい。(今の時点では6/25のものが表示されてしまう)
|
86
86
|
|
87
87
|
やったこと:WHERE句に`date=(select max(date) from table1 as t2 where t1.SC=t2.SC)`
|
88
88
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
```MYSQL
|
76
76
|
|
77
|
-
select *,max(volume) as maxVol from
|
77
|
+
select *,max(volume) as maxVol from table1 as t1
|
78
78
|
|
79
79
|
WHERE date BETWEEN "2019-06-20 00:00:00" AND "2019-06-27 15:00:00" AND todays_close > ago_close AND date BETWEEN "2019-06-25 15:00:00" AND "2019-0627 15:00:00" GROUP BY SC HAVING COUNT(*) = 3
|
80
80
|
|