Assuming iquantity is required, the following result was found.
(BCY)") AS "Invoice Line Subtotal", MAX(invitm."Tax Amount") AS "Invoice Line Tax", MAX(inv."Shipping Charge (BCY)" / if(iquantity."InvItm Line Count" = 0, 1, iquantity."InvItm Line Count")) AS "Invoice Line Shipping excl Tax", MAX(if_null(inv."Shipping...