题解 | #用户每月最后一周的练题数#
用户每月最后一周的练题数
https://www.nowcoder.com/practice/00fa10258481407b9a4b3f9a93703700
select device_id,date_format(event_date,'%Y年%m月') as ym, count(*) as cnt from question_practice_detail where datediff(last_day(event_date),event_date)<=6 group by device_id, ym order by device_id, ym