Hello
I need to perform a query that returns me the weekly balance of certain products in stock. For example:
Ano/Semana | Saíram | Entraram | Saldo ______________________________________ 2015/01 | 4 | 10 | [Entraram] - [Saíram] 2015/02 | 7 | 2 | ([Entraram] - [Saíram]) + Saldo da linha acima
And so the records are over. Always taking the result of the subtraction of the products that came with the products that came out and adding up with the balance of the registry immediately above.
I have no idea where to start ...