题解 | #今天的刷题量(一)#

今天的刷题量(一)

https://www.nowcoder.com/practice/e18f56796ae94c3d885e61c8d57a950e

#题单名称+提交量 按提交量降序提单号升序
#当日

select
    name
    ,cnt
from (
        select
            distinct
            name
            ,subject_id
            ,count(m.id)over(partition by subject_id) cnt #提交量
        from submission m
            left join subject s
                on s.id=m.subject_id
        where create_time=curdate()#当日题单名称
        order by 3 desc,2#提交量降序提单号升序
        ) a

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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