Skip to main content
Skip table of contents

NQL summarize

The summarize statement condenses the information into a single result.

Syntax

CODE
...
| summarize <new metric name> = <metric>.<aggregation function>

Examples

Compute the average value of the number of page views per device.

CODE
devices
| with web.page_views from Jun 1 to Jun 7
| compute num_navigations = number_of_page_views.sum()
| summarize average_num_navigation_per_device = num_navigations.avg()

average_num_navigation_per_device

115.9

Count the number of devices active in the last 7 days. In case of the count() aggregation function, you can omit the filed name before the aggregation to count the number of records of the root table.

CODE
devices during past 7d
| summarize number_of_devices = count()

number_of_devices

285

Compute the total size of all the binaries.

CODE
binaries during past 7d
| summarize total_size = size.sum()

total_size

611.3 GB

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.