top of page

Enhance Weekly Field Reporting Metrics Reporting Comparison for All Brands and Territories

Requirement

Introduction: The business requires a unified weekly sales reporting output that includes Field Reporting metrics to compare performance at territory and representative level. The query must filter only valid customers, apply business unit-market-product restrictions, and join aligned territory data to bring representative details. The output table field_reporting_sales_weekly should capture current, previous, growth, % growth, market share and across defined weekly time buckets.

 

Requirements: Develop SQL logic, Read the Use c360_field_reporting_sales_customer with BU-Market-Product restrictions. Compute both reporting & IC metrics with previous, growth, % growth, market share. Exclude restricted customer IDs. Only use weekly time buckets (W1–W26, C4W, C13W, C26W, C52W). Bring primary representative staff ID & name from alignment table. provide the expected columns as customer details, brand, market, territory, rep info, TRx, previous, growth, %growth, market share and save into field_reporting_sales_weekly view.

 

Final output: Display the results

 

Unity catalog: c360_field_reporting_sales_customer

Purgo AI Agentic Code

bottom of page