mysql按日统计,去重后汇总

select date_format(t.login_date,’%Y-%m-%d’) AS 日期,COUNT(DISTINCT t.user_id) as 人数
from user_login t
group by date_format(t.login_date,’%Y-%m-%d’) ORDER BY t.login_date ASC;

统计系统每天登录人数,去除重复登录

    原文作者:earthhour
    原文地址: https://blog.csdn.net/earthhour/article/details/109743863
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞