我在mysql表中有一堆日期数据,如下所示:
2010-02-13 1:00:00, "soma data"
2010-02-13 1:25:00, "soma data"
2010-02-13 1:37:00, "soma data"
2010-02-13 2:12:00, "soma data"
Run Code Online (Sandbox Code Playgroud)
我想选择一个显示按小时分组的数据的报告,例如:
On Feb 13, during the hour from 1:00 pm to 1:59 pm, there were 3 data points.
On Feb 13, during the hour from 2:00 pm to 2:59 pm, there was 1 data points.
...
Run Code Online (Sandbox Code Playgroud)
基本上我想报告一天中每小时发生的累计记录数量.所以最终结果会给我一个10天的报告,以24小时为增量进行分解,这样我就可以看到在任何给定的一天中任何给定时间内有多少数据.
TIA,希望你能帮忙!