select t2.name,count(t1.subject_id) as cnt from submission t1 left join subject t2 on t1.subject_id=t2.id where create_time=current_date group by subject_id,t2.name order by cnt desc,subject_id asc