Company: ZomatoPA_IITK
Difficulty: medium
Problem Description Write a SQL query to calculate the total drug sales for each manufacturer. The total sales should be divided by one million, rounded to the nearest integer, and represented as an integer. Report your results in descending order of these total sales. In case of any ties in the rounded total sales, sort the manufacturers alphabetically. Schema Table: pharmacy_sales manufacturer (VARCHAR) - The name of the drug manufacturer. drug_name (VARCHAR) - The name of the drug. sales (DECIMAL) - The total sales amount for the drug in dollars. Required Output manufacturer - The name of the manufacturer. total_sales_millions - The total sales for the manufacturer, represented in millions and rounded to the nearest integer. Constraints or Notes The output must be sorted by total_sales_millions in descending order. Secondary sorting must be done alphabetically by the manufacturer name in ascending order. Assume sales values are non-negative and do not contain NULLs. Standard SQL rou