select date_format(submit_time,'%Y%m') submit_month, count(*) month_q_cnt, round(count(*)/day(last_day(max(submit_time))),3) avg_day_q_cnt --因为8月为一组,但是submit_time是每次答题都有的,8月有多次答题就会有多个答题时间,因此将多个变成一个用max()函数,保证8月分母只有一个31 from practice_record where score is not null and year(submit_time) = '2021' gr...