boxplot
Calculates the minimum, maximum, and quartile required to draw a box plot.
Syntax
boxplot EXPR [by GRP_FIELD, ...]
Required Parameter
EXPR
- An expression that is subject to the statistics.
Optional Parameter
by GRP_FIELD, ...
- Grouping fields in the aggregation, separated by a comma (
,
). This option MUST follow after theEXPR
option.
Description
The output fields are as follows:
- count: Total number of records belonging to
GRP_FIELD
. WithoutGRP_FIELD
, count the total number of records. - GRP_FIELD: Value of group field entered in the
by
clause - iqr1: First quartile for each group. The median value of the lowest 50% based on the median value, the lowest 25% of the total data
- iqr2: Second quartile for each group (median value). The most central value when the data is sorted in order
- iqr3: Third quartile for each group. The median value of the highest 50% based on the median value, the highest 25% of the total data
- max: Maximum value for each group
- min: Minimum value for each group
Usage
-
Five-number summary for overall CPU load.
table sys_cpu_logs | eval usage = kernel + user | boxplot usage
-
Five-number summary for CPU load by date.
table sys_cpu_logs | eval day = string(_time, "yyyy-MM-dd") | eval usage = kernel + user | boxplot usage by day