Skip to main content

statistics

Creates, updates, deletes, gets or lists a statistics resource.

Overview

Namestatistics
TypeResource
Idaws.iot.statistics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
averagenumber (double)The average of the aggregated field values.
countintegerThe count of things that match the query string criteria and contain a valid aggregation field value.
maximum_number (double)The maximum aggregated field value.
minimum_number (double)The minimum aggregated field value.
std_deviationnumber (double)The standard deviation of the aggregated field values.
sumnumber (double)The sum of the aggregated field values.
sum_of_squaresnumber (double)The sum of the squares of the aggregated field values.
variancenumber (double)The variance of the aggregated field values.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_statisticsselectregionReturns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String, only the count statistic is returned. Requires permission to access the GetStatistics action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the count, average, sum, minimum, maximum, sum of squares, variance, and standard deviation for the specified aggregated field. If the aggregation field is of type String, only the count statistic is returned. Requires permission to access the GetStatistics action.

SELECT
average,
count,
maximum_,
minimum_,
std_deviation,
sum,
sum_of_squares,
variance
FROM aws.iot.statistics
WHERE region = '{{ region }}' -- required
;