select subject.name, cnt from ( select subject_id, count(id) cnt from submission where create_time=date_format((select now()),'%Y-%m-%d') group by subject_id) c left join subject on c.subject_id=subject.id order by cnt desc, subject_id asc
select subject.name, cnt from ( select subject_id, count(id) cnt from submission where create_time=date_format((select now()),'%Y-%m-%d') group by subject_id) c left join subject on c.subject_id=subject.id order by cnt desc, subject_id asc