Here is the full list of aggregation types officially supported by Lago.

AggregationDescriptionTranscription
COUNTCount the number of times an incoming event occursCOUNT(events.code)
COUNT UNIQUECount the number of unique value of a defined property for incoming eventsCOUNT_DISTINCT(events.properties.property_name)
LATESTGet the latest value of a defined property for incoming eventsLAST_VALUE(events.properties.property_name) OVER ([PARTITION BY events.timestamp])
MAXGet the maximum value of a defined property for incoming eventsMAX(events.properties.property_name)
SUMSum a defined property for incoming eventsSUM(events.properties.property_name)
WEIGHTED SUMSum a defined property for incoming events, prorated based on time used per periodSUM(events.properties.property_name) / (DATEDIFF(SECOND, timestamp.event_1, timestamp.event_2) + 1) * (DATEDIFF(SECOND, 'period_start', 'period_end') + 1)
CUSTOMDefine a custom code for your aggregationCustom code
Except the COUNT (that is counting the number of times an event occurs), the other types aggregate over a single property of the event. The result of this aggregation will be used to charge your customers.

Here is the full list of aggregation types officially supported by Lago.

AggregationDescriptionTranscription
COUNTCount the number of times an incoming event occursCOUNT(events.code)
COUNT UNIQUECount the number of unique value of a defined property for incoming eventsCOUNT_DISTINCT(events.properties.property_name)
LATESTGet the latest value of a defined property for incoming eventsLAST_VALUE(events.properties.property_name) OVER ([PARTITION BY events.timestamp])
MAXGet the maximum value of a defined property for incoming eventsMAX(events.properties.property_name)
SUMSum a defined property for incoming eventsSUM(events.properties.property_name)
WEIGHTED SUMSum a defined property for incoming events, prorated based on time used per periodSUM(events.properties.property_name) / (DATEDIFF(SECOND, timestamp.event_1, timestamp.event_2) + 1) * (DATEDIFF(SECOND, 'period_start', 'period_end') + 1)
CUSTOMDefine a custom code for your aggregationCustom code
Except the COUNT (that is counting the number of times an event occurs), the other types aggregate over a single property of the event. The result of this aggregation will be used to charge your customers.