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

今天的刷题量(一)

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

with t1 as (
    select b.name, a.subject_id, create_time
    from submission as a
    left join subject as b
    on a.subject_id = b.id
)
select name, cnt
from (
    select name, subject_id, count(create_time) as cnt
    from t1
    where create_time = CURDATE()
    group by name, subject_id
    order by cnt desc, subject_id
) as e;

全部评论

相关推荐

04-14 20:10
已编辑
门头沟学院 Java
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务