add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE table_a
(timestamp datetime)
;
INSERT INTO table_a
(timestamp)
VALUES
('2020-11-28 04:00:00'),
('2020-11-28 05:00:00'),
('2020-11-29 01:00:00'),
('2020-11-29 02:00:00'),
('2020-11-29 03:00:00')
;
SELECT CAST(DATE(timestamp) AS DATETIME) AS my_datetime,
COUNT(*) AS count
FROM table_a
GROUP BY my_datetime;
my_datetime count
2020-11-28 00:00:00 2
2020-11-29 00:00:00 3