How can I return average from a list?

Hello,

I am collecting user data from a flutterflow app, which is being stored as a list in Algolia. This is a list of doubles. I am looking for a way to be able to search my database based off the average of this list.

The average number returns a players ranking. So it is important to be able to filter players by their average rank.
Also, is it possible to be able to search within ranges? For example, player ranks between 70-80 and return all the players who’s average is between 70 and 80?

Any help is greatly appreciated. I am currently using flutter flow with Algolias API, so any advice on how to do this with Algolias API would be super.

I don’t believe this is a use case for Algolia.
Algolia manages indexes to improves search [speed].

To me, this is more a use case for a SQL DB where you’d group by player, calculate the average and check against the average of all the players

pseudocode would be something like this

SELECT *
FROM players,
GROUP by player.id HAVING AVG(rank) BETWEEN 70 AND 80