Skew - script function
Skew() returns the skewness of expression over a number of records as defined by a group by clause.
Syntax:
Skew([ distinct] expr)
Return data type: numeric
Arguments:
Argument | Description |
---|---|
expr | The expression or field containing the data to be measured. |
DISTINCT | If the word distinct occurs before the expression, all duplicates will be disregarded. |
Examples and results:
Add the example script to your app and run it. Then build a straight table with Type and MySkew as dimensions.
Example | Result |
---|---|
Skew1: LOAD Type, Skew(Value) as MySkew Resident Table1 Group By Type;
|
The results of the Skew() calculation are:
|