34,588
社区成员
发帖
与我相关
我的任务
分享
select case when 语文 >=80 then '优秀' when 语文 >=60 then '及格' else '不及格' as 语文,
select case when 数学 >=80 then '优秀' when 数学 >=60 then '及格' else '不及格' as 数学,
select case when 英语 >=80 then '优秀' when 英语 >=60 then '及格' else '不及格' as 英语from table
学习select
case when 语文>=80 then 优秀,
when 语文>=60 and 语文<80 then 及格,
when 语文<60 then 不及格
end as 语文,
case when 数学>=80 then 优秀,
when 数学>=60 and 数学<80 then 及格,
when 数学<60 then 不及格
end as 数学,
case when 英语>=80 then 优秀,
when 英语>=60 and 英语<80 then 及格,
when 英语<60 then 不及格
end as 英语
from
tb
select
case when 语文 >= 80 then '优秀' when 语文 >= 60 and 语文 < 80 then '及格' else '不及格' end 语文,
case when 数学 >= 80 then '优秀' when 数学 >= 60 and 数学 < 80 then '及格' else '不及格' end 数学,
case when 英语 >= 80 then '优秀' when 英语 >= 60 and 英语 < 80 then '及格' else '不及格' end 英语
from tb