Company: Media_Net_Product_Analysis
Difficulty: medium
Problem Description Given a table WORKERS , write an SQL query to find the number of workers who have the maximum total earnings among all workers. The total earnings of a worker is calculated as: DailyWage * DaysWorked . Schema The WORKERS table has the following columns: ID (INT): The unique identifier for the worker. Name (VARCHAR(255)): The name of the worker. DailyWage (INT): The daily wage of the worker. DaysWorked (INT): The number of days the worker has worked. Required Output The query should return a single row with exactly one column. A (INT): The count of workers who have the maximum total earnings. Constraints or Notes The output column must be aliased as exactly A . Examples Example 1: Input: WORKERS table: +----+-------+-----------+------------+ | ID | Name | DailyWage | DaysWorked | +----+-------+-----------+------------+ | 1 | Alice | 100 | 20 | | 2 | Bob | 200 | 10 | | 3 | Carol | 150 | 10 | | 4 | Dave | 50 | 40 | +----+-------+-----------+------------+ Output: +---+