case when then 语句问题,总是提示“case附近有语法错误”,希望专家赐教。。在线等啊
selectcount(*)as人数casesalarywhensalary>4000andsalary<=5000then'高薪'whensalary>=1000and...
select
count(*) as 人数
case salary
when salary>4000 and salary<=5000 then '高薪'
when salary>=1000 and salary<=4000 then '低薪'
else 'null'
end as '等级'
from telenolist
group by
case salary
when salary>4000 and salary<=5000 then '高薪'
when salary>=1000 and salary<=4000 then '低薪'
else 'null'
end 展开
count(*) as 人数
case salary
when salary>4000 and salary<=5000 then '高薪'
when salary>=1000 and salary<=4000 then '低薪'
else 'null'
end as '等级'
from telenolist
group by
case salary
when salary>4000 and salary<=5000 then '高薪'
when salary>=1000 and salary<=4000 then '低薪'
else 'null'
end 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询