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

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

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

with t1 as (select uid,max(start_time) as last_time
from exam_record
group by uid
union all
select uid, max(submit_time) as last_time
from practice_record
group by uid),

t2 as (select uid, date_format(max(last_time),'%Y%m') as last_time
from t1
group by uid)

select uid, nick_name,achievement
from user_info as a
join t2 using(uid)
where t2.last_time='202109'
and achievement between 1200 and 2500
and nick_name like ('牛客%号')

可以用union来找出两个作答表的最近活跃时间,然后连接user_info进行where条件判断即可

全部评论

相关推荐

06-25 16:53
门头沟学院 Java
人力小鱼姐:简历可以直接用飞书模板 模拟面试可以试试ai,现在好多都还是免费阶段 像Sugar云面、多面鹅都不错,主要看面试后自己能不能复盘出有效信息
为了找工作你花了哪些钱?
点赞 评论 收藏
分享
鬼迹人途:你去投一投尚游游戏,服务器一面,第一个图算法,做完了给你一个策略题,你给出方案他就提出低概率问题,答不上当场给你挂
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务