Here I want to subtract the required Qty for a part from On Hand and then the result from the required for next sequence
One way would be wiht a window function. You need to partition correctly though.
insert into inventory values ('A',1,10,3), ('A',2,10,2), ('B',1,5,3), ('B',2,5,2), ('B',3,5,2) select *, Remaining = OnHand - sum(required) over (partition by Part order by OrderNo) from inventory
Note, you seem to have miscalculated Part B in your expected results.