Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 1.9 KB

stddev_samp.md

File metadata and controls

66 lines (48 loc) · 1.9 KB
description
Returns the sample standard deviation (square root of sample variance) of non-NULL values in a column with a numeric data type. If all records inside a group are NULL, returns NULL.

STDDEV_SAMP

Syntax

STDDEV_SAMP(numeric_expression double) → double

  • numeric_expression: The set of records to calculate the sample standard deviation for.

Examples

{% code title="STDDEV_SAMP example" %}

SELECT STDDEV_SAMP(gas_used) 
FROM eth.recent_blocks
-- 2.259665033869644

{% endcode %}

STDDEV_SAMP(numeric_expression float) → double

  • numeric_expression: The set of records to calculate the sample standard deviation for.

Examples

{% code title="STDDEV_SAMP example" %}

SELECT STDDEV_SAMP(gas_used) 
FROM eth.recent_blocks
-- 2.259665033869644

{% endcode %}

STDDEV_SAMP(numeric_expression int32) → double

  • numeric_expression: The set of records to calculate the sample standard deviation for.

Examples

{% code title="STDDEV_SAMP example" %}

SELECT STDDEV_SAMP(transaction_count) 
FROM eth.recent_blocks
-- 1.3670214641762426

{% endcode %}

STDDEV_SAMP(numeric_expression int64) → double

  • numeric_expression: The set of records to calculate the sample standard deviation for.

Examples

{% code title="STDDEV_SAMP example" %}

SELECT STDDEV_SAMP(transaction_count) 
FROM eth.recent_blocks
-- 1.3670214641762426

{% endcode %}