Alright, so I'm building a new app, and with GDPR and all I have chosen to structure my data with UserID's at the toplevel, so deleting all data for a user becomes extremely easy.
This unfortunately means that other operations become a bit harder, but I'm hoping that with firestore's data-structure there's a way to solve my issue.
I am logging a series of checkins, the structure looks like this: checkins/{userid}/log/{checkin}
The checkin object contains a space_id, which correlate to another top level collection called spaces.
Now I want to count the number of checkins made by ALL users in a selected space, but I don't know how I would ask firebase to look at ALL userid/log/checkin's and find the one's with space_id = x.
Is there a neat and efficient way to do this?