👉 SQL Portfolio Project Indian Census- Part 1 kzbin.info/www/bejne/f2S8p518m9NnbZo
@PradeepKumar-dw6ws6 ай бұрын
What about this point The company_code is string, so the sorting should not be numeric. For example, if the company_codes are C_1, C_2, and C_10, then the ascending company_codes will be C_1, C_10, and C_2.
@PradeepKumar-dw6ws6 ай бұрын
Point 2) What about if a senior manager just joint and does not have any employee assigned to him Means not entry in the employee table then what will be the count for that manager
@HarshSoni-x3j5 ай бұрын
select a.company_code,a.founder, count(distinct(b.lead_manager_code)), count(distinct(b.senior_manager_code)), count(distinct(b.manager_code)), count(distinct(b.employee_code)) from company a join employee b using(company_code) group by a.company_code,a.founder order by a.company_code;