please help me.
I have 2 tables, one for sales and the other for stock.
The inventory table receives data (customer id and product) that is informed via a bot every time the customer goes through a certain flow.
however, I need this product to be counted only if the sale is made.
In the sales table you will find the customer’s id. and this table is only fed if the customer makes the purchase.
So basically I need a column in the inventory table that asks the following question: if the sales table has an ID equal to the inventory table then 1 if not 0.