Performs a histogram calculation given a table, a column, and an interval function. The input parameter interval is used to produce bins of that size and the result, computed over the records falling within each bin, is returned. For each bin, the start value is inclusive, but the end value is exclusive--except for the very last bin for which the end value is also inclusive. The value returned for each bin is the number of records in it, except when a column name is provided as a value_column in input parameter options. In this latter case the sum of the values corresponding to the value_column is used as the result instead.
Input Parameter Description
Name | Type | Description | ||||
---|---|---|---|---|---|---|
table_name | string | Name of the table on which the operation will be performed. Must be an existing table or collection. | ||||
column_name | string | Name of a column or an expression of one or more column names over which the histogram will be calculated. | ||||
start | double | Lower end value of the histogram interval, inclusive. | ||||
end | double | Upper end value of the histogram interval, inclusive. | ||||
interval | double | The size of each bin within the start and end parameters. | ||||
options | map of strings | Optional parameters. Default value is an empty map ( {} ).
|
Output Parameter Description
Name | Type | Description |
---|---|---|
counts | array of doubles | The array of calculated values that represents the histogram data points. |
start | double | Value of input parameter start. |
end | double | Value of input parameter end. |