当前系统日期 curdate()
今天的刷题量(一)
https://www.nowcoder.com/practice/e18f56796ae94c3d885e61c8d57a950e
select name,cnt
from(
select
distinct subject_id,
name,
count(create_time) over(partition by name) cnt
from submission a
left join subject b on a.subject_id=b.id
where create_time=curdate()-1
) t
order by cnt desc,subject_id


查看24道真题和解析