我有一个表Aud_Usd
,其中的时间以分钟为增量(08-09-2017 10:00:00)和价格
(外汇兑换率,例如0.797) )。我想在一个表中显示:
Time | Price | Time + 5 minutes | Corresponding price to Time + 5 minutes
本质上,我只是想比较该时期价格的变动情况。我一直坚持显示相应的价格。目前我有
SELECT Time, Price, ADDTIME(Time, '00:01:00') As tplus5, ??
谢谢!
最佳答案
试试这个:
SELECT au.Time, au.Price, ADDTIME(au.Time, '00:05:00') As tplus5,
(select price from Aud_Usd where Time = ADDTIME(au.Time, '00:05:00')) as
PricePlus5
from Aud_Usd au
关于MySQL - 显示日期、时间加 5 分钟、价格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46108569/