User rank based on cumulative rows
I don't think I understand your question, but you may benefit from a rollup. MySQL have there own version of grouping sets that look like:

SELECT country_id
     , province_id
     , user_id
     , SUM(score) AS total_score 
FROM activities 
GROUP BY country_id, province_id, user_id
WITH ROLLUP;


null in user_id column means an aggregation, dito för province_id. I.e.

1   null    null    64390


is the total for country_id = 1