题解 | #今天的刷题量(一)#
今天的刷题量(一)
http://www.nowcoder.com/practice/e18f56796ae94c3d885e61c8d57a950e
select b.name, a.cnt from (select subject_id, count(subject_id) as "cnt" from submission where create_time=current_date() group by subject_id) a
join subject b on a.subject_id=b.id order by cnt desc, a.subject_id;