Hello I have a table named scores and another named games. As basic as possible the tables look like this.
scores:
Player AverageKills
extcy 5
games:
Player Kills
extcy 5
extcy 6
extcy2 4
extcy 7
I am trying to take the Average of all the kills inside of the kills for just extcy and not extcy2 and add that to the data in scores by updating the original extcy row.
UPDATE scores, games
SET scores.AverageKills = AVG(games.Kills)
WHERE scores.Player = games.Player;
any ideas on what I am doing wrong with this code above?