Hi,
sql column - trans_value contain both positive and negative value amount.
so i'm trying to figure out how do i set a sum of positive value and negative value aside, so that i can calculate the how much sum of positive and how much is sum of negative.
so in the end, i can minus both, positive - negative.
edit, i forgot to mention before that
there is also column name product id in same table, so
product_id | trans_value
1 200
1 250
1 -150
2 500
2 -300
3 200
3 -150
so i need to get sum of product id 1, display it out, then for 2, 3 and so on.
thanks