select ui.uid, count(distinct date_format (un.time, '%y%m')) as act_month_total, count(distinct case when year (un.time) = 2021 then date_format (un.time, '%y%m%d')else null end) as act_days_2021, count(distinct case when year (un.time) = 2021 and tag = 'exam' then date_format (un.time, '%y%m%d') el...