为什么一直报错说没分组呢?看了半天也没看出来问题
SQL_ERROR_INFO: "Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'practice_record.submit_time' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"
select
date_format(submit_time,'%Y%m') as submit_month,
count(*) as month_q_cnt,
round(count(*)/day(last_day(submit_time)),3) as avg_day_q_cnt
from practice_record
group by date_format(submit_time,'%Y%m')
union all
select
'2021汇总' as submit_month,
count(*) as month_q_cnt,
round(count(*)/31,3) as avg_day_q_cnt
from practice_record
order by submit_month;