(status, date_start, date_end).
(1, '2021-08-01 20:10:14', '2021-08-02 02:15:43')
(1, '2021-08-01 20:00')
(1, '2021-08-01 21:00')
(1, '2021-08-01 22:00')
....
(1, '2021-08-02 02:00')
select status, generate_series(
date_trunc('hour', date_start),
date_trunc('hour', date_end),
interval '1 hour')
from tab