Hello I am unable to convert the following mongoDB query into spring query, i have tried multiple ways, but did not get the result.
db.getCollection(\'FarmerCrop
Have you ever thought about using MongoDB compass? It will make your work very simple.
MongoDB compass connect to your instancesave pipeline optionexport to language and select JavaHere is the java query
Arrays.asList(match(and(eq("cropData.crop", "RICE"), lt("creationTime", 1551447981473.0d))), group(new BsonNull(), avg("average", "$cropData.cropPrice"), max("max", "$cropData.cropPrice"), min("min", "$cropData.cropPrice")))