SUM(CASE WHEN action_type='debit'THEN action_amount ELSE 0END)->Calculates total debit amount per client.
SUM (CASE WHEN action_type='credit'THEN action_amount ELSE 0 END)->Calculates total credit amount per client.
for clinet_id =10,
Balance =382.