NQL count()
The count()
function returns the number of unique objects or punctual events.
Using with the ‘compute’ clause
For objects:
It returns the number of unique objects.
For punctual events:
It computes the number of events per object.
For sampled events:
It is not recommended to use the count()
function on sampled events as it will return the number of data samples, not the actual number of events.
Using with the ‘summarize’ clause
When used with the summarize
clause, the count()
function always returns the number of records in the root table.
For objects:
It returns the number of objects.
For punctual events:
It returns the number of events.
Note that the following query returns the number of records of root table (in this case, devices), not the number of unique events. To count events, use the sum()
function in the summarize
clause instead.
For sampled events:
It is not recommended to use the count()
function on sampled events as it will return the number of data samples, not the actual number of events.
Last updated