我有一张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"
我想选择一个按小时分组显示数据的报告,例如:
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.
...
基本上,我想报告每天每小时发生的记录累积数量。因此,最终结果会给我一个报告,比如10天,分为24小时的增量,这样我就可以看到在任何给定的一天的任何给定小时内有多少数据。
谢谢,希望你能帮忙!