Total operation in BAQ

I'm new to E9 and was wondering if someone could provide advice on a BAQ matter. I would like the total scrap of job (with multiple labor entries) presented in a column in a baq. How would I develop the statement in the calculated field?

I was thinking it would be something like this;
If LbrDtl.jobnum equals/matches JobHead.jobnum, then sum/total, etc.

Any advice would be very much appreciated.

Thanks for your time,

DB