易错点: 1.对于各个数据都为零的用户,也要记录在表中:用left join 2.date_format(time,'%y%m%d')函数掌握不熟悉 3.count函数里用case when then end之前没用过,新思路 4.问题拆分求解 select uid, count(distinct act_month) as act_month_total, count(distinct case when year(act_day)=2021 then act_day end) as act_day_2021, count(distinct case...