题解 | #月均完成试卷数不小于3的用户爱作答的类别#

月均完成试卷数不小于3的用户爱作答的类别

http://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845

with t1 as (
    select
        uid
    from exam_record
    where submit_time is not null
    group by uid
    having(count(submit_time)/count(DISTINCT substr(submit_time,1,7))>=3)
)
select
    i.tag
    ,count(r.exam_id) as tag_cnt
from examination_info i join exam_record r using(exam_id)
where r.uid in (select * from t1)
group by i.tag
order by tag_cnt desc
全部评论

相关推荐

水墨不写bug:疑似没有上过大学
点赞 评论 收藏
分享
06-18 13:28
已编辑
门头沟学院 Web前端
爱睡觉的冰箱哥:《给予你300的工资》,阴的没边了
点赞 评论 收藏
分享
uu们,拒offer时hr很生气怎么办我哭死
爱睡觉的冰箱哥:人家回收你的offer,或者oc后没给你发offer的时候可不会愧疚你,所以你拒了也没必要愧疚他。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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