Total OnHandQty

Use a windowing function,

sum(PartBin.QtyOnHand) over (partition by PartBin.PartNumber)

This will give you a column with the total for all of the parts on hand.

Also, I just guessed at the field names, so they might not be right. adjust as necessary.

This is kinda long, but goes into detail about how windowing functions work.

2 Likes