You are viewing a single comment's thread. Return to all comments →
Here's another way where you don't use an where and have just one join with the Employee table as all data that we need are present over there.
select C.company_code , C.founder, count(distinct lead_manager_Code), count(distinct senior_manager_Code), count(distinct Manager_Code), count(distinct Employee_Code) from Company C join Employee 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 →
Here's another way where you don't use an where and have just one join with the Employee table as all data that we need are present over there.