大意了,我没有闪,错了两次 select d.uid,d.exam_id,format(sum(calcScore)/count(1),0) as avg_new_score from ( select c.uid,c.exam_id,if(c.maxScore=c.minScore,c.score,((c.score - c.minScore)/(c.maxScore - c.minScore)) * 100) as calcScore from ( select a.uid,a.exam_id,a....