Assuming invsopoitm is required, the following result was found.
sum up the profits as well as include the customer name and other invoice references for the client's report: SELECT MAX(invsopoitm."Invoice Date") AS "Invoice Date", MAX(invsopoitm."Invoice Ref") AS "Invoice Ref", MAX(c."Customer Name") AS "Customer",...