Debit and credit match query

Hi

Sorry

I am able to see the data
Please explain what you are looking for

Example
Data
1 100 a
2 200 b

I want to add
1 + 200 then
200 - 2
equals

Some thing Like this

Looking at the data
no idea what you want to do

If i understand what you are wanting
how the data should be manipulated
to get the final output

I can work on the SQL to get the desired result