Hello everyone !
In a report, if we want to group data based on a column and aggregate it on the latest date, what are the possible options ?
We can do aggregate function max on numbers but it doesn’t work on datetime (error on type casting).
I saw that the go file aggregator.go five functions are defined (count, min, max, avg, sum), is it possible to add datetime functions like earliest and latest ? If that’s the case what will be the cleanest way to do it ?
Thank you in advance for your help !
Could you give us some use case examples for when you’d want to do min/max on dates? It should be fairly straight forward to add, so if it makes sense to us I don’t see a reason why not
Example of use case:
A module “contracts” with as columns : “clientID”, “contractStartingDate”, “contractDueDate”.
Every-time there is a new contract a line as added (even for the same client).
To show the current contract for each client, we can use a report to groupe by client and aggregate on the latest date.