Stock Mutation with Mysql
I have mutation table that stores transactions: M_Date Item_ID Qty 2024-01-02 B-0001 4 2024-01-03 B-0001 2 2024-01-03 B-0001 -1 2024-01-04 B-0001 -2 2024-01-03 B-0002 5 2024-01-03 B-0002 -2 2024-01-04 B-0002 1 2024-01-06 B-0002 -2 the scenario is; I select begin…