join과 group by 활용하는 문제.
select c.company_code, c.founder,
count(distinct m.lead_manager_code),count(distinct m.senior_manager_code),
count(distinct m.manager_code),
count(distinct m.employee_code)
from company c inner join employee m
on c.company_code=m.company_code
group by c.company_code,c.founder
order by c.company_code ;