题解 | 统计所有课程参加培训人次
select sum(course1)+sum(course2)+sum(course3) staff_nums from( SELECT CASE WHEN course LIKE'%1%' THEN 1 else 0 end course1, CASE WHEN course LIKE'%2%' THEN 1 else 0 end course2, CASE WHEN course LIKE'%3%' THEN 1 else 0 end course3 FROM cultivate_tb )a