erquhart
erquhartā€¢7mo ago

Ah but I guess you could have a large

Ah but I guess you could have a large variety of dates
11 Replies
Hmza
Hmzaā€¢7mo ago
in my scnerio its "leads" in a crm and i need to get counts of leads that were on each day
erquhart
erquhartOPā€¢7mo ago
I would keep a separate table with date counts, one record per date, and update the record on patch/insert of the table you're referencing.
Hmza
Hmzaā€¢7mo ago
i see so >how many were added per day that way i can query by _creationTime
erquhart
erquhartOPā€¢7mo ago
yep
Hmza
Hmzaā€¢7mo ago
didn't thought of that before. thanks G
erquhart
erquhartOPā€¢7mo ago
you can do this sort of thing with any kind of aggregation, but depending on scale you may need to gather the data periodically rather than on every patch/insert
Hmza
Hmzaā€¢7mo ago
yeah i can schedule something i suppose end of day. but i'll also have to worry about timezones :ahhhhhhhhh:
erquhart
erquhartOPā€¢7mo ago
you could always add the ability to trigger a refresh too, if freshness on demand is needed
Hmza
Hmzaā€¢7mo ago
yeah but its literally on overview page on the dashboard every user visits it first after logging in lol
erquhart
erquhartOPā€¢7mo ago
Ah I see
Hmza
Hmzaā€¢7mo ago
i think best would be that first thing you helped me think šŸ¤

Did you find this page helpful?