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

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

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

WITH t1 AS(
SELECT
job,
LEFT(date, 7) AS first_year_mon,
SUM(num) AS first_year_cnt

FROM resume_info

WHERE YEAR(date) = '2025'

GROUP BY job, LEFT(date, 7)),

t2 AS(
SELECT
job,
LEFT(date, 7) AS second_year_mon,
SUM(num) AS second_year_cnt

FROM resume_info

WHERE YEAR(date) = '2026'

GROUP BY job, LEFT(date, 7))

SELECT
t1.job,
first_year_mon,
first_year_cnt,
second_year_mon,
second_year_cnt

FROM t1
JOIN t2
    ON t1.job = t2. job AND SUBSTRING(first_year_mon, 6, 2) = SUBSTRING(second_year_mon, 6, 2)
    
ORDER BY first_year_mon DESC, t1.job DESC

全部评论

相关推荐

冲芭芭拉鸭:你这图还挺新,偷了。
投递美团等公司10个岗位
点赞 评论 收藏
分享
球球别再泡了:坏,我单9要了14
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务