id .. product ... value ... sales_id ... total value
01 .. Pen .... 2.00 .... 1 .......... 30.00
02 .. Rubber. 4.00 .... 2 ........... 25.50
03..Lapis ...... 5.00 .... 1 ........... 10.00
04 .. Pointer 9.00 ... 1 ........... 200.00
Well considering this table, I would need to sum all the values of the column valortotal
but only those that have id_venda
equal to 1 how would I do it?
ex: SALES_ID 1 TOTAL VALUE 240.00.