题解 | #实习广场投递简历分析(二)#
实习广场投递简历分析(二)
https://www.nowcoder.com/practice/d323a4c97d1945e0aabe94e4d0bbb25d?tpId=82&tags=&title=&difficulty=0&judgeStatus=0&rp=1&sourceUrl=%2Fexam%2Foj%3Fpage%3D2%26tab%3DSQL%25E7%25AF%2587%26topicId%3D82
date_format取到月份
select job,date_format(date,'%Y-%m')mon,sum(num) cnt from resume_info
where year(date)=2025
group by job,date_format(date,'%Y-%m')
order by mon desc,cnt desc
判断年份2025也可以用where date like '2025%' -- 符合最左前缀匹配原则,也走索引
SQL题解 文章被收录于专栏
主要是为自己做个笔记