Company: Protium_Finance_15_dec
Difficulty: medium
Problem Description In this MySQL challenge, your task is to analyze the budget allocation within departments, identify the top earners, and assess potential areas for budget optimization. Construct a query that accomplishes the following objectives: Department Budget Overview: Calculate the total salary allocated to each department. Top Earners Insight: Identify the employee with the highest salary for each department. Budget Utilization Analysis: Calculate the percentage of the total department budget that the top earner's salary represents. Underutilized Departments Detection: Flag departments where the top earner's salary is strictly less than 50% of the total department salary, suggesting potential for budget optimization. Schema Table Name: maintable_7JTBU DivisionID (INT): ID of the department. Name (VARCHAR): Name of the employee. Salary (DECIMAL): Salary of the employee. Required Output The result should include the exact following columns, ordered by DivisionID in ascending o