#第一种方法 # select a.uid,round(avg(if(score is null,0,score)),0) avg_score,round(avg(TRUNCATE((UNIX_TIMESTAMP(if(submit_time is null and b.tag='算法' ,DATE_ADD(start_time,INTERVAL 80 MINUTE),if(submit_time is null ,DATE_ADD(start_time,INTERVAL 60 MINUTE),submit_time)))-UNIX_TIMESTAMP(start_time))/60,0)),...