Leetcode 580. 统计各专业学生人数(常规聚合 寻找非空字段计数)

2021-04-14 14:27:46 浏览数 (1)

代码语言: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

0 人点赞