题解 | #筛选限定昵称成就值活跃日期的用户#
筛选限定昵称成就值活跃日期的用户
https://www.nowcoder.com/practice/2ed07ff8f67a474d90523b88402e401b
select
uid,
nick_name,
achievement
from user_info a
left join exam_record b using(uid)
left join practice_record c using(uid)
where nick_name like'牛客%号'
and achievement between 1200 and 2500
group by uid,
nick_name,
achievement
having max(date_format(start_time,'%Y%m'))='202109'
or max(date_format(c.submit_time,'%Y%m'))='202109'