题解 | #统计所有课程参加培训人次#

统计所有课程参加培训人次

https://www.nowcoder.com/practice/98aad5807cf34a3b960cc8a70ce03f53

with t as(
select 
    staff_id,
    if(course like '%1%',1,0) as course1,
    if(course like '%2%',1,0) as course2,
    if(course like '%3%',1,0) as course3
from cultivate_tb
where course is not null)

select sum(course1)+sum(course2)+sum(course3) as staff_nums
from t




全部评论

相关推荐

双尔:你就写拥有ai开发经历,熟练运用提示词,优化ai,提高ai回答质量
点赞 评论 收藏
分享
gelmanspar...:奖学金删掉,自我评价删掉,简历压缩一下,写一页
如果再来一次,你还会学机...
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务