select uid,max(间隔) as days_window, round(sum(试卷数量)/(datediff(max(做答日期),min(做答日期))+1)*max(间隔),2) as avg_exam_cnt # 3 /7 *6 from( select *,datediff(lead(做答日期,1) over(partition by uid order by 做答日期),做答日期)+1 间隔 from( select uid,date(start_time) 做答日期,count(exam_id) 试卷数量 from exam_record where year(start_...