代码语言:javascript复制
select dept_name,count(student_id) student_number
from department d left join student s on
d.dept_id=s.dept_id
group by dept_name
order by 2 desc,1