mysql统计用户周活跃_MySql查询脚本用于计算每个月的活跃用户数
你可以用一招来做到这一点.从每个日期添加一个月,然后您可以使用union all和聚合计数:select year(logindate), month(logindate), count(distinct userid)from ((select logindate, useridfrom logger) union all(select date_add(longdate, interval 1...