Hi @Volodymyr_Ialovyi , @mark-piller ,
I am almost there.
Without the whereClause
I get a nice array of objects:
[
{
"group_full": null,
"subject": "Math",
"created": 1618490273000,
"timezone": "GMT+1",
"group_capacity": 2,
"slotsCount": 1,
"slots_slug": "MAX2-GRADE 7-MATH-WED16:00-GMT-RAVINA",
"ownerId": null,
"tutor": "Ravina",
"group_size": null,
"grade": "Grade 7",
"___class": "groups",
"updated": 1618575879000,
"objectId": "0490AC5C-F7BB-4E6F-BF55-291BFC996742",
"group": "MAX2"
},
{
"group_full": null,
"subject": "ESL",
"created": 1618496761000,
"timezone": "GMT+2",
"group_capacity": 3,
"slotsCount": 1,
"slots_slug": "MAX3-ESL A2-ESL-THU15:00-GMT-ASHLEIGH",
"ownerId": null,
"tutor": "Ashleigh",
"group_size": null,
"grade": "ESL A2",
"___class": "groups",
"updated": 1618557880000,
"objectId": "091D2DC4-C3AD-4795-99E8-6A652EAE9B87",
"group": "MAX3"
}
]
But If I add a where clause such as slotsCount < 2
I get the following error:
{
"code": 1111,
"message": "Invalid use of group function"
}
Any thoughts on what I am doing wrong?