--测试数据
create table test_date(col_date date);
insert into test_datevalues(to_date('2021-11-16 22:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 23:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 24:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 20:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 18:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 07:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 08:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 14:35:00','yyyy-mm-dd hh24:mi:ss'));
insert into test_datevalues(to_date('2021-11-16 12:35:00','yyyy-mm-dd hh24:mi:ss'));
commit;
求助一下,请问当天8:00 到第二天早上8:00如果按2小时进行分组,如何统计呢?
|