Hi @Anna_N_A and thank you for sharing the sample documents with other details.
Looking at the sample document shared I feel the schema could be redesigned in a more efficient way.
The recommendation here is to make the reports schema a separate collection which would make the query meeting your requirements simpler and more readable.
The sample document from the reports collection would look like:
{
"_id" : ObjectId(),
"category" : "abc",
"name" : "Product1",
"isBroke" : true,
"dateTime" : ISODate("2023-03-16T10:00:00.000+0000"),
"offset" : NumberInt(-60),
"announcedRepair" : ISODate("2023-07-18T00:00:00.000+0000")
}
Let us know if you can consider the above recommendation which would further help us to form an efficient query response.
Best Regards
Aasawari