FORMULA
Sum (DaysLactationCycleOfWeaning)
--------------------------------------------------
Weaning QtyTotalFinalCycle
WHEN:
Sum: sum for each TOTAL weaning that is the last weaning of the cycle.
DaysLactationWeaning Cycle: difference in days of the last TOTAL weaning of the sow in the cycle and farrow of the sow in the cycle.
QtyWeaningTotalFinalCycle: Number of TOTAL weanings, whose total weaning is the last weaning of the cycle.
ATTENTION!
1-Consider only the TOTAL WEANS, whose total weaning is the last weaning of the cycle.
2-Disregard the total weaning of a nurse sow after an abortion. We are considering only females that have had farrow and total weaning in the cycle.