New Companies
JOIN, GROUP BY, COUNT, ORDER BY
Last updated
JOIN, GROUP BY, COUNT, ORDER BY
Last updated
Each of the companies follows this hierarchy:
Write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total number of managers, and total number of employees. Order your output by ascending company_code.
Note:
The tables may contain duplicate records.
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
Sample Input
Company Table:
Lead_Manager Table:
Senior_Manager Table:
Manager Table:
Employee Table:
Sample Output
Solution:
Link to Full Output