Source_No Parent Type Amt
123 123 Tail 100
456 123 Coll 100
789 123 Coll 100
I want the code to create a new column a new column 'Tot_Amt' which will add the Amt of all Source_No, where Parent = Source_No and for other
Expected output.
Source No Parent Type Amt Tot_Amt
123 123 Parent 100 200
456 123 Child 100 0
789 123 Child 100 0
Source_Noa unique value for each row? Can two rows have the sameSource_No?