select ui.uid, count(distinct date_format (start_time, '%Y_%m')) as act_month_total, count( distinct if ( year (start_time) = 2021, date_format (start_time, '%Y%m%d'), null ) ) as act_days_2021, count( distinct if ( ...