I have a data like:
Surgery Type 1 ,2, 3 ...
and some surgeon roles in 4 tiers like role 1, 2, 3,4
I need to count each surgery type for a specific role as in:
Surgery Type 1: 1 Role 1, 4 Role 2, 3 Role 3 etc.
I want to show this in a dashboard however I could not find a better way other than using multiple count queries as in the picture.
My questions are
Is there a better way (other than using cloud function to count)
How is the workload for firestore in such a setup. Both in terms of performance and costs of querying.