You are viewing a single comment's thread. Return to all comments →
On oracle i notice the company_code is repeated on all tables so i made join on it with all tables
select A.company_code , A.founder , count(distinct lm.lead_manager_code) , count(distinct sm.senior_manager_code) , count(distinct m.manager_code) , count(distinct e.employee_code) from company A join Lead_Manager lm on A.company_code =lm.company_code join Senior_Manager sm on A.company_code =sm.company_code join Manager m on A.company_code = m.company_code join Employee e on A.company_code = e.company_code group by A.company_code,A.founder order by A.company_code;
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 →
On oracle i notice the company_code is repeated on all tables so i made join on it with all tables