I have a table of deposit statements and withdrawals from some clients, as follows:
id_cliente|operação|valor |
----------+--------+------+
51298 | 01 | 50,00|
----------+--------+------+
51298 | 01 | 48,50|
----------+--------+------+
51298 | 02 | 13,67|
----------+--------+------+
51298 | 02 | 18,17|
----------+--------+------+
Operations with values referring to 1 are deposits, with value 2 are withdrawals. How do I perform a query returning the balance amount of the client? An sql that already returns me the difference of values.