Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 1.73 KB

File metadata and controls

67 lines (47 loc) · 1.73 KB
description
Returns the sample variance of non-NULL records.

VAR_SAMP

Syntax

VAR_SAMP(numeric_expression int64) → double

  • numeric_expression: The set of records to calculate variance for.

Examples

{% code title="VAR_SAMP example" %}

SELECT VAR_SAMP(transaction_count) 
FROM eth.recent_blocks
-- 1.868747683518558

{% endcode %}

VAR_SAMP(numeric_expression float) → double

  • numeric_expression: The set of records to calculate variance for.

Examples

{% code title="VAR_SAMP example" %}

SELECT VAR_SAMP(gas_used) 
FROM eth.recent_blocks
-- 5.106086065187043

{% endcode %}

VAR_SAMP(numeric_expression double) → double

  • numeric_expression: The set of records to calculate variance for.

Examples

{% code title="VAR_SAMP example" %}

SELECT VAR_SAMP(gas_used) 
FROM eth.recent_blocks
-- 5.106086065187043

{% endcode %}

VAR_SAMP(numeric_expression int32) → double

  • numeric_expression: The set of records to calculate variance for.

Examples

{% code title="VAR_SAMP example" %}

SELECT VAR_SAMP(transaction_count) 
FROM eth.recent_blocks
-- 1.868747683518558

{% endcode %}

Usage Notes

For single input records, VAR_SAMP will return NULL.