Invoiced but nor returned productIDs will not appear
My question is as follows: I have a table named Invoices, with the Date, ProductID, CustomerID and InvoicedQuantity. The other table is ReturnOrders, with the Date, ProductID, CustomerID and ReturnedQuantity as well.
I also have a Product table, with the ProductID and ProductName.
I would like to get the number of sold ReturnedQuantity of a specific ProductID divided by the InvoicedQuantity in a period of time.
The problem I am facing is that if a customer has not returned a productID, that productID will not it does not appear as invoiced. Apart from the syn table.
I am loading the tables with those names. How could I face this issue to get all the invoices, even if a customer has returned the productID or not?