Click or drag to resize
sqx

MOMENTS Structure

Aggregate [Vector] MOMENTS([float] Value, [bit] Population)

Namespace:  sqx
Assembly:  SQX (in SQX.dll) Version: 1.0.2.6 (1.0.2.6)
Syntax
C#
[SerializableAttribute]
public struct MOMENTS : IBinarySerialize
Remarks
Moments aggregate function.

NOTE: All parameters except Value must remain constant within the GROUP BY.

Attributes

Format.UserDefined, IsInvariantToDuplicates = false, IsInvariantToNulls = true, IsInvariantToOrder = true, IsNullIfEmpty = true, MaxByteSize = -1
Examples
SQL
WITH sample_data AS (SELECT sqx.Exponential_PPF(Value, 0.2) X FROM sqx.UTable(1000, 1))
SELECT mt.*
FROM (SELECT sqx.MOMENTS(X, 0) MOM FROM sample_data) p
CROSS APPLY sqx.MomentsTable(p.MOM) mt
/*
Mean                   StDeviation            Variance               Skewness               ExKurtosis             CV                     SEM
---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ---------------------- ----------------------
5.09517975061131       5.24362417700216       27.4955945096416       2.40630275115801       10.0831224136487       1.02913428645438       0.165817955932527*/
See Also