How to aggregate documents (more than 16K)?

Hi, I know aggregations, joins, etc may not be the most performance queries but something the developer have no other option.

How can I count all the documents of a table? Also, I need to count the documents by month, for example: All the invoices per year, per month, per week, etc.

I would not like to export to elasticsearch because would make me lose the realtime capabilities.
image.png
Was this page helpful?