add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
date qty Stock
2018-01-01 00:00:00 100 null
2018-01-02 00:00:00 100 100
2018-01-03 00:00:00 100 200
2018-01-04 00:00:00 100 300
2018-01-05 00:00:00 100 400
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't
ADD        (SELECT Sum(qty) 
        From   Transactions 
        Where  Trans' at line 1
code qty date
123 100 2018-01-01 00:00:00
123 100 2018-01-02 00:00:00
123 100 2018-01-03 00:00:00
123 100 2018-01-04 00:00:00
123 100 2018-01-05 00:00:00
date qty Stock
2018-01-01 00:00:00 100 null
2018-01-02 00:00:00 100 100
2018-01-03 00:00:00 100 200
2018-01-04 00:00:00 100 300
2018-01-05 00:00:00 100 400