top of page

Implementation of Volume logic in pre_t1 query table.

Requirement

Introduction :Daily/Monthly/Weekly Sales refers to the total revenue generated from selling goods or services in a single day/month/week. Tracking daily sales is essential for businesses as it helps assess performance, make informed decisions, and spot trends in customer behaviour or product demand. This tables  helps in identifying which products or services are selling the most. Provides insights into trends, popular items, or seasonal shifts. The number of units sold each day.Indicates demand and customer preferences.

 

 Requirement: Write a  query to  update the logic in pre_t1_master table under sequence =1. pre_t1_master table has pre_t1_query column which contains SQL queries as string, replace the current query with new logic as below:

 

This query should select all the columns from “stage_table” table and compute a column named “volume_total” using the formula - “Gross_Sales/packs” for the brand_name “CIPRO” and “BIOMERK” and for other brand_name old “volume_total” value remains.

 

Logic:

 

Volume= Gross_Sales/packs

 

Expected Output : Databricks query

Purgo AI Agentic Code

bottom of page