Insights into Therapeutic Area Sales: Top and Underperforming Medicine Products
Requirement
Introduction: This analysis aims to identify the top-performing and underperforming therapeutic areas based on sales data. By analyzing the sales performance of medical products within therapeutic areas
such as oncology, cardiology, neurology, ophthalmology, and gastroenterology, organizations can determine which therapeutic areas are generating the most revenue and which may require additional attention or interventions.
Requirements:
Read the table 'purgo_playground.hcp_overall_performance'
Therapeutic Area-wise Sales Analysis:
Groups the data by Therapeutic_Area and calculate the total product, total sales amount, average sales amount and order by descending the results by Total Sales. Top-performing therapeutic area based on high Total Sales. Underperforming Therapeutic Areas identifies therapeutic areas with low of Total Sales.
Final Output: show result of Therapeutic Area-wise Sales Analysis, Top 2 Therapeutic Areas and Underperforming 2 Therapeutic Areas.
Write Pyspark code without syntax error.
Unity catalog: purgo_playground.hcp_overall_performance