天天看點

Leetcode 580. 統計各專業學生人數(正常聚合 尋找非空字段計數)

Leetcode 580. 統計各專業學生人數(正常聚合 尋找非空字段計數)
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           

複制