top of page
Calculate primary allocated qty of a plant's location for the drug sales
Requirement
Introduction: The allocated quantity represents the stock that has been set aside for fulfilling specific customer orders, production orders, or transfer orders within the supply chain.
Requirement: Create a SQL logic to show order_nbr and allocated_qty in inventory stock management table ‘f_order’ that reflects how much of the plant’s inventory has been committed to specific uses.
Clarification: The leading or primary table is f_order.
Specific business logic: So for that “order_nbr” and “order_line_nbr” has an entry in table “f_order” then add the qty of 4 columns primary_qty, open_qty, shipped_qty, and cancel_qty to represent the allocated_qty.
Purgo AI Agentic Code
bottom of page