眼花,没看到学院表,系部表中没有 学院ID 列班表中没有 系部ID列你再整整看吧。
select 班级,学号,(case when 成绩>90 then '优'when 成绩>80 and 成绩<=90 then '良'when 成绩>60 and 成绩<=80 then '中'else '差' end) as 成绩from table_name