#按天统计,并去重SELECT DATE_FORMAT(inst_dtm, '%Y%m%d') days, count(DISTINCT(d.user_id)) countFROM t_daily_living dGROUP BY days;