有如下一张记录表,如何查询出每隔15分钟的记录数,例如电商网站统计一个间隔的交易数等等……
预期结果如下:
--建表语句
--创建练习表
create table LX_02
(
id NUMBER,
inputtime DATE
);
--插入数据
insert into lx_02 (ID, INPUTTIME)
values (1, to_date('14-01-2020 09:07:23', 'dd-mm-yyyy hh24:mi:ss'));
commit;
insert into lx_02 (ID, INPUTTIME)
values (8, to_date('14-01-2020 09:53:23', 'dd-mm-yyyy hh24:mi:ss'));
commit;
insert into lx_02 (ID, INPUTTIME)
values (2, to_date('14-01-2020 09:08:23', 'dd-mm-yyyy hh24:mi:ss'));
commit;
insert into lx_02 (ID, INPUTTIME)
values (3, to_date('14-01-2020 09:11:23', 'dd-mm-yyyy hh24:mi:ss'));
commit;
insert into lx_02 (ID, INPUTTIME)
v