Use a CTE credits with only credit transactions. Show each account_id and its total credit (total_credit).
credits
account_id
total_credit
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.