Consulta MongoDB - Know how many people improved their points compared to the previous month

0

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.

    
asked by AnnaPS 21.09.2018 в 08:59
source

0 answers