You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering what would be the best approach here to get the "ranking position" of a User A in comparison to all other users.
The goal would be to display #3 next to the user's name if he's 3rd in his total points.
User X has 1 point
User Y has 1000 points
User Z has 900 Point
User A has 800 Points -> he's in 3rd position in the global users ranking.
My first thought would be to run a daily cron job to aggregate each user's points in a new column on the users table. Then query all users ordered by this column ?
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hello!
I was wondering what would be the best approach here to get the "ranking position" of a User A in comparison to all other users.
The goal would be to display
#3
next to the user's name if he's 3rd in his total points.User X has 1 point
User Y has 1000 points
User Z has 900 Point
User A has 800 Points -> he's in 3rd position in the global users ranking.
My first thought would be to run a daily cron job to aggregate each user's points in a new column on the users table. Then query all users ordered by this column ?
Thanks in advance
The text was updated successfully, but these errors were encountered: