You are viewing a single comment's thread. Return to all comments →
Here is one valid option
SELECT COMPANY.company_code, COMPANY.founder, COUNT(DISTINCT Lead_Manager.lead_manager_CODE), COUNT(DISTINCT Senior_Manager.senior_manager_code), COUNT(DISTINCT Manager.manager_code), COUNT(DISTINCT Employee.employee_code) FROM COMPANY JOIN Lead_Manager ON COMPANY.company_code = Lead_Manager.company_code JOIN Senior_Manager ON COMPANY.company_code = Senior_Manager.company_code JOIN Manager ON COMPANY.company_code = Manager.company_code JOIN Employee ON COMPANY.company_code = Employee.company_code GROUP BY COMPANY.company_code, COMPANY.founder
Seems like cookies are disabled on this browser, please enable them to open this website
New Companies
You are viewing a single comment's thread. Return to all comments →
Here is one valid option
SELECT COMPANY.company_code, COMPANY.founder, COUNT(DISTINCT Lead_Manager.lead_manager_CODE), COUNT(DISTINCT Senior_Manager.senior_manager_code), COUNT(DISTINCT Manager.manager_code), COUNT(DISTINCT Employee.employee_code) FROM COMPANY JOIN Lead_Manager ON COMPANY.company_code = Lead_Manager.company_code JOIN Senior_Manager ON COMPANY.company_code = Senior_Manager.company_code JOIN Manager ON COMPANY.company_code = Manager.company_code JOIN Employee ON COMPANY.company_code = Employee.company_code GROUP BY COMPANY.company_code, COMPANY.founder