A
ali
I have a table with two products (currently) "petrol" & "diesel"
------------------------------------------------------------------------------------
ID Product_iD Product Original_amt Draw Outstanding
1 101 Petrol 1200 100 0
2 102 Diesel 3000 50 0
3 101 Petrol 1200 150 0
4 101 Petrol 1200 200 0
------------------------------------------------------------------------------------
I bought $1200 of Petrol and $3000 for the Deisel.
As time goes, i draw them down for private use.
------------------------------------------------------------------------------------
My question:
I'd like to see the "sum of total draw-down" of each product.
------------------------------------------------------------------------------------
Therefore, my desired result should look like this:
product_id product Total_Draw_Down
101 Petrol 450
102 Diesel 50
------------------------------------------------------------------------------------
ID Product_iD Product Original_amt Draw Outstanding
1 101 Petrol 1200 100 0
2 102 Diesel 3000 50 0
3 101 Petrol 1200 150 0
4 101 Petrol 1200 200 0
------------------------------------------------------------------------------------
I bought $1200 of Petrol and $3000 for the Deisel.
As time goes, i draw them down for private use.
------------------------------------------------------------------------------------
My question:
I'd like to see the "sum of total draw-down" of each product.
------------------------------------------------------------------------------------
Therefore, my desired result should look like this:
product_id product Total_Draw_Down
101 Petrol 450
102 Diesel 50