Avatar of Jaymin Sathavara
Jaymin Sathavara

asked on 

I have following table.I want Query in SQL as per output Table

Table.pngI have add one column like 'AdditionQty' and value of that column like which orderid is '0' for particular Adviceid as well as Itemid. Second one is if Orderid  0 is found but that itemid  is not match  in that Adviceid then min adviceid add that Qty as AdditionQty.I want output like below table...

OutPut Table
SQLMicrosoft SQL Server 2008

Avatar of undefined
Last Comment
Pawan Kumar

8/22/2022 - Mon