I have some products in a table tbProduct which has these columns:
- Pcode
- product
- Avg_costprice
And I have another table which its name is tbStockIn and it has these columns:
- Pcode
- Product
- Cost-price
How can I take the average of the column Cost-price according to Pcode, and show the output in the column Avg_costprice?
Please help me.