Multiple Querries from firestore

Database & APIs

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

  1. Is there a better way (other than using cloud function to count)

  2. How is the workload for firestore in such a setup. Both in terms of performance and costs of querying.

What have you tried so far?

Used multiple queries

Did you check FlutterFlow's Documentation for this topic?
No
2
3 replies