T Sql Running Total Inventory Slow Performance Sql Server 2016

T Sql Running Total Inventory Slow Performance Sql Server 2016