Here I have a table Stocks Where Sqty column multiple times goes to 0 and here calculation on DateTime and Cqty column I need a sql query where Sqty goes to 0 then calcu