我使用unix时间戳记每隔1-3秒记录一次温度,我希望得到一行数据平均每隔1分钟返回并持续24小时。Mysql每分钟的平均值指的是unix时间戳
我的记录表是这样的:
unixtime temp
1350899052 25.37
1350899054 25.44
1350899057 25.44
1350899059 25.44
1350899062 25.44
1350899064 25.44
1350899069 25.44
1350899071 25.44
,我希望喜欢它返回的
unixtime temp
1350899052 25.37 -- average value of 1 minute range both unixtime and temp
1350899054 25.44
1350899057 25.44
请指教如何MySQL命令应该怎么办?谢谢。
是的,因为它显示了1970年的分钟数。你的输出应该是什么样子? 2012-10-12 00:00:01 25,777 2012-10-12 00:00:02 28,999 ? –
我得到了回报作为munite:22517598 26.64000075204032不unix时间平均如我所料,但接近我怎么会得到回报作为unix时间在平均期间,谢谢你的帮助 – Nont
我修改升技和它的工作,非常感谢 – Nont