You are viewing a single comment's thread. Return to all comments →
SELECT DISTINCT e.company_code, 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 JOIN Employee e ON e.company_code = c.company_code GROUP BY e.company_code, Founder;
We dont need to join all the tables. Since all the data is present on employees table. we only need to join the company table
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 →
We dont need to join all the tables. Since all the data is present on employees table. we only need to join the company table