题解 | #筛选限定昵称成就值活跃日期的用户#

筛选限定昵称成就值活跃日期的用户

https://www.nowcoder.com/practice/2ed07ff8f67a474d90523b88402e401b

select uid,nick_name,achievement
from user_info
where nick_name like "牛客%号" and achievement between 1200 and 2500
and uid in (
        select uid
        from (
            select uid, start_time as 'act_time'        from exam_record
            union all
            select uid, submit_time as 'act_time'       from practice_record
        ) as a
        group by uid
        having date_format(max(act_time), '%Y%m')='202109'
    )

这道题的重点是需要在练习和答题中找到最近一次活跃在九月的。

全部评论

相关推荐

头像
11-06 10:58
已编辑
门头沟学院 嵌入式工程师
双非25想找富婆不想打工:哦,这该死的伦敦腔,我敢打赌,你简直是个天才,如果我有offer的话,我一定用offer狠狠的打在你的脸上
点赞 评论 收藏
分享
1 收藏 评论
分享
牛客网
牛客企业服务