There is a relation defined on the prodcalctrans as
ProdCalcTrans.IdRefRecId == ProdBom.RecId
ProdCalcTrans.IdRefTableId == ProdBOM.TableId
I would start there. If your setup is producing duplicates I would look at adding a groupby to your statement.
Hope this helps.