jordendubs - What is the best way to query a bu...
What is the best way to query a buildship database or flow logs grouped by a parameter?
I need to do a count query grouped by parameter
6 Replies
Hi @jordendubs
groupby
isn't supported by cloud firestore yet. But as a workaround here you can directly use the Query Count
BuildShip Database node with the filter and groupby on client side (frontend).hi @jordendubs , as Gaurav mentioned group by is currently not supported by firestore. This means you would first have to query all the documents in your collection and then group them by whatever field you want. For example here I have a stripe table and I want to group by planId. You can actually edit the current Collection Query node with AI to facilitate group by after loading the documents.
I am sharing a remix link that you can test out with your own collection https://app.buildship.com/remix/6713cbe7-60ac-4778-a8e2-fa65fc1a211a
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.
Of course as previously mentioned you can handle the group by in your client code as well