PostgreSQL查询统计某个时间段内每天请求的数量
select to_char(return_time ,'yyyy-MM-dd'),count(1) from table where time between '2021-09-01' and '2021-09-30' group by to_char(time ,'yyyy-MM-dd')
PostgreSQL查询统计出单量峰值
select max(a.count) from (select count(1) as count from table where time between '2021-09-01' and '2021-09-30' group by to_char(time ,'yyyy-MM-dd')) a
PostgreSQL查询统计出平均响应时间
select avg(cast(split_part(,'ms',1) as integer)) from table where time between '2021-09-01' and '2021-09-30'
PostgreSQL查询统计出最大在线并发用户数(每秒)
select max(a.count) from (select count(*) as count from table where time between '2021-01-01' and '2021-09-30' group by to_char(time ,'yyyy-MM-dd HH24:MI:ss')) a