Assuming pquantity is required, the following result was found.
Delivery", 0) AS "PO Total Shipping", if_null(pdiscrepancy."PO Discrepancy Total", 0) AS "PO Total Discrepancy", if_null(pquantity."PO Total Qty", 1) AS "PO Total Qty", (if_null(pshipping."PO Delivery", 0) / if(if_null(pquantity."PO Total Qty", 0) = 0,...