I would like to know how to make a query in MongoDB that will return how many people from my database improved in points with respect to the previous month . The fields of the bbdd would be something like this:
{
id_persona : "1",
fecha : "201808",
puntos : "12.89"
}
{
id_persona : "1",
fecha : "201809",
puntos : "22.89"
}
In the end the idea is to go through the bbdd and know the exact number of people who improved their score. Any suggestions? Thank you very much.