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

SELECT
    d1.job,
    d1.mon AS first_year_mon,
    d1.cnt AS first_year_cnt,
    d2.mon AS second_year_mon,
    d2.cnt AS second_year_cnt
FROM
    (SELECT
         job,
         DATE_FORMAT(date, '%Y-%m') AS mon,
         SUM(num) AS cnt
     FROM resume_info
     WHERE YEAR(date) = 2025
     GROUP BY job, mon
     ORDER BY mon DESC, cnt DESC) d1
LEFT JOIN
    (SELECT
         job,
         DATE_FORMAT(date, '%Y-%m') AS mon,
         SUM(num) AS cnt
     FROM resume_info
     WHERE YEAR(date) = 2026
     GROUP BY job, mon
     ORDER BY mon DESC, cnt DESC) d2
on d1.job = d2.job and right(d1.mon,2)=right(d2.mon,2)

order by d1.mon desc,d1.job desc;

全部评论

相关推荐

点赞 评论 收藏
分享
牛客都很牛:牛友可以把实习和工作那块儿写细一点,比如说用了什么技术,指标多少提升,成果咋样感觉校园任职那块儿可以精简点省出空间
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务