top of page

To Analyze the low performance region of medicine category by revenue threshold

Requirement

Introduction: Analyze sales data to identify continents and medicine categories with low performance based on total revenue below a specific threshold. This helps in strategizing targeted interventions for underperforming areas and products.

 

Requirements:

 

Read the table ‘sales_data’

 

Revenue Aggregation: Aggregate Revenue by Continent and Category.

 

Low-Performing Continent and Category Detection:

Filter aggregated data where Total_Revenue is less than the threshold (700.0).

 

Sort data by Total_Revenue in descending order to identify Top-performing categories.

 

Show the output with low performance Continent.

 

Write pyspark code without syntax error.

 

Unity Catalog: sales_data

Purgo AI Agentic Code

bottom of page