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

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

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

需要注意的是比如date_sub("2021-01",interval 1 year) 是没用的

select t1.job ,t1.first_year_mon , t1.first_year_cnt , t2.second_year_mon,t2.second_year_cnt from

(select job,date_format(date,'%Y-%m') as first_year_mon, sum(num) as first_year_cnt from resume_info where year(date)=2025 group by job,date_format(date,'%Y-%m'))t1

join

(select job,date_format(date,'%Y-%m') as second_year_mon, sum(num) as second_year_cnt from resume_info where year(date)=2026 group by job,date_format(date,'%Y-%m'))t2

on right(t1.first_year_mon,2)=right(t2.second_year_mon,2) and t1.job=t2.job

order by first_year_mon desc , job desc

全部评论

相关推荐

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