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

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

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


SELECT k.job,k.first_year_mon,k.first_year_cnt,
l.scond_year_mon,l.scond_year_cnt
FROM
(
SELECT DISTINCT(a.job),a.date AS first_year_mon,
SUM(a.num) AS first_year_cnt 
FROM
(
SELECT job,DATE_FORMAT(date,'%Y-%m') AS date,num
FROM
resume_info
WHERE
date LIKE '2025%'
)a
GROUP BY a.date,a.job
)k,
(
SELECT DISTINCT(a.job),a.date AS scond_year_mon,
SUM(a.num) AS scond_year_cnt
FROM
(
SELECT job,DATE_FORMAT(date,'%Y-%m') AS date,num
FROM
resume_info
WHERE
date like '2026%'
)a
GROUP BY a.date,a.job
)l
WHERE
k.job = l.job
AND
RIGHT(k.first_year_mon,2) = RIGHT(l.scond_year_mon,2)
ORDER BY
k.first_year_mon DESC,
k.job DESC
全部评论

相关推荐

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