
In SQL, we have the RAND()
function, is there an equivalent in Appwrite?
In my app, the user answers questions, which all have an Elo rating. I'm actually unfamiliar with how to choose which question next (matchmaking algorithms), but one way would be to choose a random value, I guess. If any of you guys have a better suggestion on how to tackle my specific problem, please let me know. Ideally, items would not repeat too much, and the range of question Elo should be similar to the user's.

Currently Nope. Either you would have to know the total ammount of docuements in your collection then use a random function to genarate some random offset then query using those random offset. Or you can fetch much docs See how much docs are there Then pick a random one. Btw There is a feature request of this issue https://github.com/appwrite/appwrite/issues/5205 You could show intrest in this 🤷♂️
Recommended threads
- Data Diet Needed
I love the nested related data... but can we request limited data? I think my requests need to go on a diet. I return my courses, and the units all come with th...
- Array attribute
hi i have a question i'm making e commerce website where you can order some phones computers, i want to make collection which will contain attributes likes firs...
- Database DeleteDocuments triggered via D...
Running self hosted 1.7.4. Have a dart cleanup function that deletes stale documents from a collection. Recently updated the function to use DeleteDocuments ins...
