题解 | #实习广场投递简历分析(三)#

实习广场投递简历分析(三)

https://www.nowcoder.com/practice/83f84aa5c32b4cf5a75558d02dd7743c

WITH T AS
(
    SELECT
        job
        ,SUBSTR(date,1,7) MON
        ,SUM(num) CNT
    FROM resume_info
    WHERE SUBSTR(date,1,4) IN ('2025','2026')
    GROUP BY job,SUBSTR(date,1,7)
    ORDER BY MON DESC,CNT DESC
)
SELECT 
    T.job
    ,MAX(CASE WHEN SUBSTR(MON,1,4) = '2025' THEN MON END) first_year_mon
    ,MAX(CASE WHEN SUBSTR(MON,1,4) = '2025' THEN CNT END) first_year_cnt
    ,MAX(CASE WHEN SUBSTR(MON,1,4) = '2026' THEN MON END) second_year_mon
    ,MAX(CASE WHEN SUBSTR(MON,1,4) = '2026' THEN CNT END) second_year_cnt
FROM T
GROUP BY T.job,SUBSTR(MON,6,7)
ORDER BY first_year_mon DESC ,T.job DESC
;

全部评论

相关推荐

喜欢走神的孤勇者练习时长两年半:爱华,信华,等华,黑华
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务