For the complete documentation index, see llms.txt. This page is also available as Markdown.

stdev()

stdev(col) returns the sample standard deviation of the values in the provided column.

Non-numeric values are ignored. Standard deviation requires at least two values to calculate; if the provided column does not have enough numeric values or the column does not exist, stdev will return null.

Returns

A table with one row and one column, called @q.stdev.

Examples

Return the standard deviation of elapsed time in milliseconds across all requests in the checkout_api service.

kubernetes.container_name: "checkout_api"
| stdev(log.elapsed_ms)

Compute the standard deviation of elapsed time in milliseconds for requests in the checkout_api service, aggregated by host.

kubernetes.container_name: "checkout_api"
| stats stdev(log.elapsed_ms) by host

Last updated

Was this helpful?