Click image for larger version. 

Name:	table.png 
Views:	3 
Size:	17.4 KB 
ID:	16344

i have transaction table like left table. my question is how can i make additional column without add it to original table, like an alias column, so my table will be looked like the right table, balance column only make math operation. if the id is "db" then subtract the balance, if id is "cr" then add the balance.
how is the query i need to make that right table from left table?

thanks for the help!