Mysql – Implementing FIFO (first in first out) in sql
I have a table of stock ID Qty DatePurchased Price 11202 4 01/01/2023 3 11202 3 12/06/2023 7 5050 4 11/10/2023 60 11202 4 12/10/2023 5 5050 8 12/12/2023 70 and Item sold table ID Qty 11202 6 I want…