题解 | #今天的刷题量(一)#
今天的刷题量(一)
https://www.nowcoder.com/practice/e18f56796ae94c3d885e61c8d57a950e
SELECT s.name,cnt FROM ( SELECT subject_id,COUNT(*) cnt FROM submission WHERE create_time = CURRENT_DATE GROUP BY subject_id ) t1 JOIN `subject` s ON t1.subject_id = s.id ORDER BY cnt DESC,subject_id