2
I have a table called players and I need to add the values of the column points but only those that have the same account_id and after placing the result in another table called Accounts in which have the indicated id. The result would be this:
Table players:
account_id |pontos
1 |50
1 |100
2 |25
2 |20
Table Accounts:
id |pontos
1 |150
2 |45
You need a
INSERT INTO SELECT
. I will now owe the SQL, but is the tip for who can answer you with more details.– Dherik