Aggregate events
const aggregates = await client.events.aggregate.count({ filter: { assetIds: [1, 2, 3] } }); console.log('Number of events: ', aggregates[0].count)
const uniqueValues = await client.events.aggregate.uniqueValues({ filter: { assetIds: [1, 2, 3] }, fields: ['subtype'] }); console.log('Unique values: ', uniqueValues)
Aggregate events
const aggregates = await client.events.aggregate.count({ filter: { assetIds: [1, 2, 3] } }); console.log('Number of events: ', aggregates[0].count)