0
我已經得到了有關選擇和組合時間 例如一個問題,我得到了下面的時間在數據庫:如何選擇和每5秒間隔分組日期?
2014-03-31 00:00:06
2014-03-31 00:00:06
2014-03-31 00:00:06
2014-03-31 00:00:16
2014-03-31 00:00:16
2014-03-31 00:00:16
2014-03-31 00:00:22
2014-03-31 00:00:22
2014-03-31 00:00:22
2014-03-31 00:00:26
2014-03-31 00:00:26
2014-03-31 00:00:26
2014-03-31 00:00:39
2014-03-31 00:00:39
2014-03-31 00:00:39
2014-03-31 00:00:42
2014-03-31 00:00:42
2014-03-31 00:00:42
2014-03-31 00:00:49
2014-03-31 00:00:49
2014-03-31 00:00:49
2014-03-31 00:00:58
2014-03-31 00:00:58
2014-03-31 00:00:58
2014-03-31 00:01:30
2014-03-31 00:01:30
2014-03-31 00:01:30
2014-03-31 00:01:39
2014-03-31 00:01:39
2014-03-31 00:01:39
2014-03-31 00:01:40
2014-03-31 00:01:40
2014-03-31 00:01:40
2014-03-31 00:01:47
2014-03-31 00:01:47
2014-03-31 00:01:47
2014-03-31 00:02:06
2014-03-31 00:02:06
2014-03-31 00:02:06
2014-03-31 00:02:09
而且我想他們的5 seconds
間隔組,指望他們 EG。
2014-03-31 00:00:00 Count 0
2014-03-31 00:00:05 Count 3
2014-03-31 00:00:10 Count 0
2014-03-31 00:00:15 Count 3
2014-03-31 00:00:20 Count 3
etc....
我試過使用date_format,似乎我不能按預期對它們進行分組。
謝謝所有的SOers。