Average Age of my users

I have the age of all my user in my database. I want to do the average.
I heard custom function (but no because no async call), or custom actions or whatever I all ear. I just don't know how I'm suppose ideally to make some computation from my database data ..

NB: the age data is not in a list. It's inside the user collection as a simple integar. Each line is a customer and inside it, there is the age data. Not an "age data list" with all ages in list inside.

Thanks to anyone helping :)

2
6 replies