📅  最后修改于: 2022-03-11 14:54:57.132000             🧑  作者: Mango
select c.company_code,
c.founder,
count(distinct e.lead_manager_code),
count(distinct e.senior_manager_code),
count(distinct e.manager_code),
count(distinct e.employee_code)
from company c
inner join employee e on e.company_code = c.company_code
group by c.company_code,c.founder
order by c.company_code;