SELECT DISTINCT level,score_grade,ratio FROM (SELECT level,score_grade,uid, ROUND(COUNT(score_grade)OVER(PARTITION BY level,score_grade)/COUNT(score_grade)OVER(PARTITION BY level),3) AS ratio FROM (SELECT er.uid,ui.level,er.exam_id,er.score, C...