MySQL - Elegant Sum -
i looking elegant solution seemingly simple mysql problem:
i've got table soccer teams , game results soccer league.
league day team1 team2 points1 points2 bl0910 1 munich hamburg 3 0 bl0910 1 bremen stuttgart 1 1 ...
now want add together column, points of team previous game days 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 possible elegant syntax, or have utilize cursors , temporary table?
kind regards theo
mysql sum
No comments:
Post a Comment