使用INNER JOIN连接方式查询,按学历统计“经管学院”职工的学历分布情况,包括学历和人数。

img


使用INNER JOIN连接方式查询,按学历统计“经管学院”职工的学历分布情况,包括学历和人数


select e.education,count(e.*) from tbl_departments d
inner join tbl_employees e on e.department_id=d.id
where d.department='经管学院'
group by e.education

select e.education,count(e.*) from tbl_departments d
inner join tbl_employees e on e.department_id=d.id
where d.department='经管学院'
group by e.education