Creating a leaderboard

There are many TESTs, each of them can have multiple SCOREs from a USER.

Is there a way to show the best SCORE from each USER for a given TEST?

Is this a list of SCORES, filtered somehow? Or should this be a list of USERS?

You can create the data in the internal DB, then apply a Sorting against whatever SCORE you wish.
You would need to have a relationship of
TEST → USER (1:MANY)

Can you show some example data? I can help further if I can visualise it.

Hey @jgaskell, thank you for your reply!
Unfortunately, I don’t think it’s that easy.

Say that I multiple TESTs (named a, b and c)
Each test can have multiple USERs (named user1, user2, user3)
Each user can have multiple SCOREs (named score1, score2, score3)

How to structure a list such that you have for each TEST, the best SCORE per USER?

Hi @montetennis,

I’ve experimented a bit and have some ideas.
Please see the video I’ve made: https://youtu.be/OkOdMD8WJz8
Sorry, no external microphone :wink:

P.S. Someone might also want to expand it further and have the top-scores-per-user to be sorted. For this, I think another collection will be required (smth like “top scores”), as having multiple scores per one user per one test and having single top score for one user for one test would be difficult to implement with a single scores collection.

Just my 2 cents, sorry to interfere :slight_smile:

Best,
Victor

2 Likes

Victor, wow! That’s an extensive answer.
I didn’t think of a nested list approach, this surely will help also for other things.

For what concerns the leaderboard, unfortunately, it needs to be ordered.
There I thought to add BEST_SCORE collection as well, but was struggling with the setup.

Will try some more!

ps: no offense intended for the microphone, it was just a suggestion in order to increase your video quality and subsequently the video reach.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.