I have a problem with this query:
db.estudiantes.find({materias:{$gt:"3.0"}})
The intention of this is to find students who have failed at least one subject (the minimum passing grade is 3.0)
The data has this structure:
db.estudiantes.insert({
id:"1000",
nombre:"Diego Agreda",
edad:"15",
programa:"informatica",
materias:[{programacion:"5.0",leyes:"2.1",ingles:"4.1"}]
})
When launching the query
db.estudiantes.find({materias:{$gt:"3.0"}})
It doesn't give me any results. Why does that happen? How can I solve that?