You are viewing a single comment's thread. Return to all comments →
SELECT c.company_code, c.founder, COUNT(DISTINCT l.lead_manager_code) AS total_lead_manager, COUNT(DISTINCT s.senior_manager_code) AS total_senior_manager, COUNT(DISTINCT m.manager_code) AS total_manager, COUNT(DISTINCT em.employee_code) AS total_employee FROM company AS c LEFT JOIN lead_manager AS l ON c.company_code = l.company_code LEFT JOIN senior_manager AS s ON l.company_code = s.company_code LEFT JOIN manager AS m ON s.company_code = m.company_code LEFT JOIN employee AS em ON m.company_code = em.company_code GROUP BY c.company_code, c.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 →