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

SELECT
    COUNT(*) as staff_nums
FROM
    (
        SELECT
            *
        FROM
            cultivate_tb AS ct
        WHERE
            course LIKE "%course1%"
        UNION ALL
        SELECT
            *
        FROM
            cultivate_tb AS ct
        WHERE
            course LIKE "%course2%"
        UNION ALL
        SELECT
            *
        FROM
            cultivate_tb AS ct
        WHERE
            course LIKE "%course3%"
    ) as re

全部评论

相关推荐

评论
点赞
收藏
分享
牛客网
牛客企业服务