Well, this goes back to what I was saying in post #5 in this thread:
The problem here is obviously that if you actually want the score in the table to always be up to date, EVERY row for that age/weight category could have to be recalculated every time someone in that category submits a result, because the new submission may become the "target" (best) upon which everyone elses score needs to be based.
As you just discovered, that applies to sorting, which is done in the database query, using "ORDER BY ...". So if you want to order by your calc, or some other field that uses that calc, then you'll have problems, unless you update every row (that needs it) in the table, on every submission.
So, the answer to your question:
So, what do I need to do in order to resync the whole table in order to have the sorting on Total working? Do I need for example to run an update on the db recalculating some values ?
Is yes. But its not just a one-off deal to fix the incorrect values. As explained above, you'll have to re-calculate all those totals, on every form submission, for every row in the table.
The only way I can see this working is with a PHP form submission plugin, instead of (or as well as) a calc element. Whether you need both depends on whether you are using "AJAX calc" to show the value live on the form, as they enter the data, or you just need it enetered as the form submits.
Another way might be to use a MySQL view, but that introduces another level of complexity to your overall application, as youd have to use different copies of the list for different purposes - we treat MySQL views as "read only tables", and trying to write data to them may have unpredicatble issues, as MysQL is very touchy about when a view can and can't be updated.
So, the next step would be to work out the query you would need to do that whole table update. The actual PHP to use in the submission plugin would be simple enough, I can provide you with that. But the query to do it, I don't have off the top of my head. It would be somewhat more complex than doing it for a single row. If you want to go googling, see if you can find an example we can work from, that'd be good. If not ... I'll do my best, but there's a limit on how long I can spend coming up with custom queries like this, on a Standard support subscription. That's more of a Pro level thing.
-- hugh