top of page

Total revenue for delivered shipments by monthwise

Requirement

Introduction: To calculate the total revenue for total delivered shipments by monthwise with client details

 

Requirements*:

Filtered the shipments table to include only records with ‘status’ column set to "Delivered."

* Added Year and Month columns derived from shipment_date to support month-wise aggregation.

* Calculated the total sum of revenue for delivered shipments grouped by client, year, and month.

* Combined the calculated data with the clients table to include client names in the final output.

* Rounded the total revenue to 2 decimals.

* Final Output: Display the client name, year, month, total revenue

 

Unity Catalog Details:

 

‘shipments’, ‘clients’.

 

Expected Output: Write Databricks Pyspark code without syntax error

Purgo AI Agentic Code

bottom of page