I am looking for an elegant solution to a seemingly simple MySQL problem:
I've got a table with soccer teams and game results from a soccer league.
league day team1 team2 points1 points2
bl0910 1 munich hamburg 3 0
bl0910 1 bremen stuttgart 1 1
...
Now I want to add a column, where all points of a team from all previous game days are summed up.
Like:
league day team1 team2 points1 points2 sum1 sum2
...
bl0910 8 bremen hamburg 1 1 11 15
bl0910 8 munich stuttgart 0 3 16 9
...
Is it possible with some elegant syntax, or do I have to use cursors and a temporary table?
Kind Regards Theo