网上的一些统计sql统计不准确,在出现start_time相同的情况下,会统计出错,现修改如下:
select max(c)
from
(
select count(*) as c
from s_statistics_info a, s_statistics_info b
where a.start_time between b.start_time and b.end_time
group by a.start_time,a.end_time
) c
网上的一些统计sql统计不准确,在出现start_time相同的情况下,会统计出错,现修改如下:
select max(c)
from
(
select count(*) as c
from s_statistics_info a, s_statistics_info b
where a.start_time between b.start_time and b.end_time
group by a.start_time,a.end_time
) c
本文标题:SQL统计在线人数、最大并发人数
本文链接:https://www.haomeiwen.com/subject/vqnxrktx.html
网友评论