题解 | #某乎问答高质量的回答中用户属于各级别的数量#

某乎问答高质量的回答中用户属于各级别的数量

https://www.nowcoder.com/practice/69c85db3e59245efb7cee51996fe2273

select
    level_cut,sum(cnt) num
        from 
         (
            select
                case when a.author_level>=1 and a.author_level<=2 then '1-2级'
                when a.author_level>=3 and a.author_level<=4 then '3-4级'
                when a.author_level>=5 and a.author_level<=6 then '5-6级'
                else '0' end as level_cut,
                count(1) cnt
            from
                author_tb a,
                answer_tb b
            where
                a.author_id = b.author_id
                and char_len > 100
            group by
                a.author_level
        ) c
        group by c.level_cut
        order by sum(cnt) desc

全部评论

相关推荐

07-02 13:50
闽江学院 Java
点赞 评论 收藏
分享
每晚夜里独自颤抖:你cet6就cet6,cet4就cet4,你写个cet证书等是什么意思。专业技能快赶上项目行数,你做的这2个项目哪里能提现你有这么多技能呢
点赞 评论 收藏
分享
醉蟀:你不干有的是人干
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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