I see now how the inter
gives the volume of the entity to the sum
method which adds it to the total amount.
I suppose TIG's one-liner is adapt for someone familiar with quickly coding into the ruby console to get a result. I am, not so advanced and prefer to see a ruby script so that I can understand what is happening. Not to say that I specifically requested a ruby, but It does help significantly that the script recognizes nested groups which, as rubys are prone to do, saves time and effort.
I appreciate both your input to helping solve my problems. Thank you very much.