I have a table called players and I need to add the values of the points column but only those that have the same account_id and after putting the result in another table called accounts just in which it has the indicated id. The result would be this:
Table players:
account_id |pontos
1 |50
1 |100
2 |25
2 |20
Accounts table:
id |pontos
1 |150
2 |45