I am fairly new to MySQL and working on an nba database.
I have a table called gamestats, with a gameID (Game table) playerid (player table) and columns points, rebounds, steals, assist and blocks. This stores data for 1 player per game.
I will then have another table called PlayerStats that should added up all the data from gamestats based on the playerID and calculate the total points, total rebounds, total steals, total assist etc.
So any time I added data into the gamestats it should auto updates to the playerstats.
trigger.