SUM_PRODUCT multiplies the values in one list with values that are on the same index in another list.
It then adds up those multiplications, resulting in a single new value.
This operator can be useful if you want to give some values in a calculation a different weight than others.
Say the overall risk factor of a client is a number calculated from five individual risk factor numbers.
Each individual risk factor is given a certain weight in the overall calculation, depending on how impactful we think that factor is.
To calculate the overall risk score using
SUM_PRODUCT, each individual risk factor score will be multiplied by its weight. The results are then summed up and returned as a single value.
For the table above, if the respective risk_factor values are 3, 6, 2, 8, and 5, the returned result would be 57.