Re: To store or calculate on the spot?
I may be wrong, but it sounds like the problem to me is: "To cache or not to cache".
Before I can give an answer (well, this is my answer), I must say it depends on the business requirements, how often "on the spot" is, AND how much data is in the table. What you want is some tradeoff between speed and 100% accuracy. If you have a boss for this job, ask him what he wants. If not, do whatever you think is best (but I imagine this forum will try to help you make that decision).
So, if storage is OK for your business rules, I would recommend that.
The other part was how often "on the spot is". If you must calculate on the spot every (FOR EXAMPLE.. again, it depends) maybe three minutes, I would recommend storing it instead of generating it live off of a possibly massive table (but I don't know how big your table is). So for slow operations, the fewer calls to the database the better. (Particularly with InnoDB and row-level locking... you're calling an aggregate function)
Don't forget that maybe you could do it nightly or weekly instead of just monthly, but that decision is entirely up to you and/or who you're doing this project for.
I'm speaking only from what I know, but I hope it helps. If I need to further explain anything or something, don't hold back on asking.
- John