You are viewing a single comment's thread. Return to all comments →
my submission for mysql
SELECT DISTINCT C.company_code, C.founder, COUNT(DISTINCT E.lead_manager_code) AS total_leads, COUNT(DISTINCT E.senior_manager_code) AS total_seniors, COUNT(DISTINCT E.manager_code) AS total_managers, COUNT(DISTINCT E.employee_code) AS total_employees FROM Company AS C LEFT JOIN Employee AS E ON E.company_code = C.company_code GROUP BY C.company_code, C.founder ORDER BY C.company_code ASC;
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 →
my submission for mysql