Hi, I have a table containing all product purchases (productid, p_date, p_price, ...) and a table containing all product sales (productid, s_date, s_price, ...). I need to calculate the profit of each sale using the latest purchase price at the time of the sale. How do I do that?
Thanks, E.