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
Each user can have multiple scores, so each user must have one score, namely the score with the highest wpm value and accuracy in the last 24 hours. Then, I want to sort them by wpm and accuracy, and take the top 3 scores.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm learning Adonis by making a simple game, I'm confused how to get the 3 highest scores for the last 24 hours based on wpm and accuracy.
This is the query I have tried:
The above query doesn't work as I expected.
Each user can have multiple scores, so each user must have one score, namely the score with the highest wpm value and accuracy in the last 24 hours. Then, I want to sort them by wpm and accuracy, and take the top 3 scores.
This is the model I made.
Level
Test
User
Score
I've done it with Prisma Orm but I'm trying to switch completely to Adonis, it's working fine in Prisma:
I've been looking for a way to do this all day long but I haven't found what I want, I really appreciate any answer, thanks in advance .
Beta Was this translation helpful? Give feedback.
All reactions