У меня есть эти данные (как было ниже), мне было интересно, как я могу выяснить, сколько записей находится между 00:00:00-00:59:59
, затем в 01:00:00-1:59:59
и т. Д. Так что дата на самом деле не учитывается, это просто время,
id | date
1 | 2018-11-08 01:40:49
2 | 2018-11-08 04:08:12
3 | 2018-11-25 15:19:44
4 | 2018-12-14 01:34:01
CSV версия:
id,date
1,2018-11-08 01:40:49
2,2018-11-08 04:08:12
3,2018-11-25 15:19:44
4,2018-12-14 01:34:01
Итак, мои ожидаемые данные будут такими:
Start Period | End Period | amount
00:00:00 | 00:59:59 | 0
01:00:00 | 01:59:59 | 2
02:00:00 | 02:59:59 | 0
03:00:00 | 03:59:59 | 0
04:00:00 | 04:59:59 | 1
05:00:00 | 05:59:59 | 0
...
And so on
CSV версия:
Start Period,End Period,amount
00:00:00,00:59:59,something here
00:01:00,01:59:59,something here
00:02:00,02:59:59,something here
00:03:00,03:59:59,something here
00:04:00,04:59:59,something here
00:05:00,05:59:59,something here
00:06:00,06:59:59,something here
00:07:00,07:59:59,something here
00:08:00,08:59:59,something here
00:09:00,09:59:59,something here
00:10:00,10:59:59,something here
00:11:00,11:59:59,something here
00:12:00,12:59:59,something here
00:13:00,13:59:59,something here
00:14:00,14:59:59,something here
00:15:00,15:59:59,something here
00:16:00,16:59:59,something here
00:17:00,17:59:59,something here
00:18:00,18:59:59,something here
00:19:00,19:59:59,something here
00:20:00,20:59:59,something here
00:21:00,21:59:59,something here
00:22:00,22:59:59,something here
00:23:00,23:59:59,something here